1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-09-18 19:22:32 +01:00

Fix tests

This commit is contained in:
nvbn
2015-09-07 12:12:16 +03:00
parent 105d3d8137
commit 382eb8b86c
11 changed files with 91 additions and 95 deletions

View File

@@ -1,5 +1,5 @@
import pytest
from mock import Mock
from thefuck import conf
def pytest_addoption(parser):
@@ -14,9 +14,15 @@ def no_memoize(monkeypatch):
monkeypatch.setattr('thefuck.utils.memoize.disabled', True)
@pytest.fixture(autouse=True)
def settings(request):
request.addfinalizer(lambda: conf.settings.update(conf.DEFAULT_SETTINGS))
return conf.settings
@pytest.fixture
def settings():
return Mock(debug=False, no_colors=True)
def no_colors(settings):
settings.no_colors = True
@pytest.fixture(autouse=True)