#682: Fix tests and flake8

This commit is contained in:
Vladimir Iakovlev
2017-08-26 06:16:51 +02:00
parent cd3a3cd823
commit 31becc9456
4 changed files with 20 additions and 12 deletions
+3 -3
View File
@@ -110,13 +110,13 @@ class TestCommand(object):
Popen = Mock()
Popen.return_value.stdout.read.return_value = b'stdout'
Popen.return_value.stderr.read.return_value = b'stderr'
monkeypatch.setattr('thefuck.types.Popen', Popen)
monkeypatch.setattr('thefuck.output.rerun.Popen', Popen)
return Popen
@pytest.fixture(autouse=True)
def prepare(self, monkeypatch):
monkeypatch.setattr('thefuck.types.Command._wait_output',
staticmethod(lambda *_: True))
monkeypatch.setattr('thefuck.output.rerun._wait_output',
lambda *_: True)
def test_from_script_calls(self, Popen, settings, os_environ):
settings.env = {}