#682: Unify work with output in classic and instant mode

This commit is contained in:
Vladimir Iakovlev
2017-08-31 17:58:56 +02:00
parent 96843fc6cd
commit 4625d8503d
237 changed files with 1322 additions and 1332 deletions
+4 -4
View File
@@ -4,7 +4,7 @@ import os
import pytest
import zipfile
from thefuck.rules.dirty_unzip import match, get_new_command, side_effect
from tests.utils import Command
from thefuck.types import Command
from unicodedata import normalize
@@ -42,7 +42,7 @@ def zip_error(tmpdir):
(u'unzip foo.zip', u'foo.zip')])
def test_match(zip_error, script, filename):
zip_error(filename)
assert match(Command(script=script))
assert match(Command(script, ''))
@pytest.mark.parametrize('script,filename', [
@@ -52,7 +52,7 @@ def test_match(zip_error, script, filename):
(u'unzip foo.zip', u'foo.zip')])
def test_side_effect(zip_error, script, filename):
zip_error(filename)
side_effect(Command(script=script), None)
side_effect(Command(script, ''), None)
dir_list = os.listdir(u'.')
if filename not in set(dir_list):
@@ -68,4 +68,4 @@ def test_side_effect(zip_error, script, filename):
(u'unzip foo.zip', u'unzip foo.zip -d foo', u'foo.zip')])
def test_get_new_command(zip_error, script, fixed, filename):
zip_error(filename)
assert get_new_command(Command(script=script)) == fixed
assert get_new_command(Command(script, '')) == fixed