1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-18 19:22:32 +01:00

#682: Fix tests and flake8

This commit is contained in:
Vladimir Iakovlev
2017-08-26 06:16:51 +02:00
parent cd3a3cd823
commit 31becc9456
4 changed files with 20 additions and 12 deletions

View File

@@ -6,7 +6,8 @@ from thefuck.const import ARGUMENT_PLACEHOLDER
def _args(**override):
args = {'alias': None, 'command': [], 'yes': False,
'help': False, 'version': False, 'debug': False,
'force_command': None, 'repeat': False}
'force_command': None, 'repeat': False,
'enable_experimental_instant_mode': False}
args.update(override)
return args
@@ -14,6 +15,8 @@ def _args(**override):
@pytest.mark.parametrize('argv, result', [
(['thefuck'], _args()),
(['thefuck', '-a'], _args(alias='fuck')),
(['thefuck', '--alias', '--enable-experimental-instant-mode'],
_args(alias='fuck', enable_experimental_instant_mode=True)),
(['thefuck', '-a', 'fix'], _args(alias='fix')),
(['thefuck', 'git', 'branch', ARGUMENT_PLACEHOLDER, '-y'],
_args(command=['git', 'branch'], yes=True)),