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

17 lines
485 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):
return types.Rule(name, match, get_new_command,
2015-05-06 12:57:09 +01:00
enabled_by_default, side_effect,
priority)