mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-30 06:34:09 +00:00
#N/A: Reset environment variables in tests
This commit is contained in:
@@ -56,7 +56,13 @@ def set_shell(monkeypatch, request):
|
||||
def _set(cls):
|
||||
shell = cls()
|
||||
monkeypatch.setattr('thefuck.shells.shell', shell)
|
||||
request.addfinalizer()
|
||||
return shell
|
||||
|
||||
return _set
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def os_environ(monkeypatch):
|
||||
env = {'PATH': ''}
|
||||
monkeypatch.setattr('os.environ', env)
|
||||
return env
|
||||
|
||||
Reference in New Issue
Block a user