1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-18 11:12:30 +01:00

Add useful constructors for Rule and Command for tests

This commit is contained in:
nvbn
2015-04-25 02:35:26 +02:00
parent bb6b9a638c
commit b7cb407637
18 changed files with 141 additions and 115 deletions

11
tests/utils.py Normal file
View File

@@ -0,0 +1,11 @@
from thefuck import types
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):
return types.Rule(name, match, get_new_command, enabled_by_default)