This commit is contained in:
Florian Bruhin 2016-09-09 17:56:58 +02:00
parent 9ff3f6810a
commit 864ec94cde
2 changed files with 4 additions and 4 deletions

View File

@ -114,7 +114,7 @@ def get_argparser():
"show any error windows (used for tests/smoke.py).")
debug.add_argument('--qt-arg', help="Pass an argument with a value to Qt.",
nargs=2)
debug.add_argument('--qt-flag', help="Pass a argument to Qt as flag.",
debug.add_argument('--qt-flag', help="Pass an argument to Qt as flag.",
nargs=1)
parser.add_argument('command', nargs='*', help="Commands to execute on "
"startup.", metavar=':command')

View File

@ -111,7 +111,7 @@ class TestGetQtArgs:
(['--debug', '--qt-flag', 'reverse'], [sys.argv[0], '-reverse']),
# Qt argument with value
(['--qt-arg', 'stylesheet', 'foo'],
[sys.argv[0], '-stylesheet', 'foo']),
[sys.argv[0], '-stylesheet', 'foo']),
])
def test_qt_args(self, args, expected, parser):
"""Test commandline with no Qt arguments given."""
@ -120,8 +120,8 @@ class TestGetQtArgs:
def test_qt_both(self, parser):
"""Test commandline with a Qt argument and flag."""
args = parser.parse_args(['--qt-arg', 'stylesheet',
'foobar', '--qt-flag', 'reverse'])
args = parser.parse_args(['--qt-arg', 'stylesheet', 'foobar',
'--qt-flag', 'reverse'])
qt_args = qtutils.get_args(args)
assert qt_args[0] == sys.argv[0]
assert '-reverse' in qt_args