mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-19 03:32:31 +01:00
#364 Attach user_dir
to settings
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
from thefuck import conf
|
||||
|
||||
@@ -16,7 +17,12 @@ def no_memoize(monkeypatch):
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def settings(request):
|
||||
request.addfinalizer(lambda: conf.settings.update(conf.DEFAULT_SETTINGS))
|
||||
def _reset_settings():
|
||||
conf.settings.clear()
|
||||
conf.settings.update(conf.DEFAULT_SETTINGS)
|
||||
|
||||
request.addfinalizer(_reset_settings)
|
||||
conf.settings.user_dir = Path('~/.thefuck')
|
||||
return conf.settings
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user