1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-06 02:41:10 +01:00
thefuck/tests/utils.py

22 lines
678 B
Python
Raw Normal View History

from thefuck import types
2015-05-06 12:57:09 +01:00
from thefuck.conf import DEFAULT_PRIORITY
def Command(script='', stdout='', stderr=''):
return types.Command(script, stdout, stderr)
def Rule(name='', match=lambda *_: True,
get_new_command=lambda *_: '',
enabled_by_default=True,
2015-05-06 12:57:09 +01:00
side_effect=None,
priority=DEFAULT_PRIORITY,
requires_output=True):
return types.Rule(name, match, get_new_command,
2015-05-06 12:57:09 +01:00
enabled_by_default, side_effect,
priority, requires_output)
2015-08-01 17:16:22 +01:00
def CorrectedCommand(script='', side_effect=None, priority=DEFAULT_PRIORITY):
return types.CorrectedCommand(script, side_effect, priority)