From 590fdba2aa70ee97240f4dc07839ef3cf66b90a1 Mon Sep 17 00:00:00 2001 From: Pablo Santiago Blum de Aguiar Date: Sun, 18 Oct 2015 19:41:21 -0200 Subject: [PATCH] Fix `rules.touch` tests Move them to `rules` sub-directory and import `shells` instead of `and_` which in turn triggers the `generic_shell` fixture fixing the tests on Fish Shell. --- tests/{ => rules}/test_touch.py | 0 thefuck/rules/touch.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename tests/{ => rules}/test_touch.py (100%) diff --git a/tests/test_touch.py b/tests/rules/test_touch.py similarity index 100% rename from tests/test_touch.py rename to tests/rules/test_touch.py diff --git a/thefuck/rules/touch.py b/thefuck/rules/touch.py index bede8130..07bbbc8d 100644 --- a/thefuck/rules/touch.py +++ b/thefuck/rules/touch.py @@ -1,6 +1,6 @@ import re +from thefuck import shells from thefuck.utils import for_app -from thefuck.shells import and_ @for_app('touch') @@ -10,4 +10,4 @@ def match(command): def get_new_command(command): path = re.findall(r"touch: cannot touch '(.+)/.+':", command.stderr)[0] - return and_(u'mkdir -p {}'.format(path), command.script) + return shells.and_(u'mkdir -p {}'.format(path), command.script)