mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-18 19:22:32 +01:00
Fix tests
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user