mirror of
https://github.com/nvbn/thefuck.git
synced 2025-09-18 19:22:32 +01:00
#441: Remove shells methods wrappers
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
from pathlib import Path
|
||||
import pytest
|
||||
from thefuck import shells
|
||||
from thefuck import conf
|
||||
|
||||
shells.shell = shells.Generic()
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
"""Adds `--run-without-docker` argument."""
|
||||
@@ -46,3 +49,14 @@ def functional(request):
|
||||
@pytest.fixture
|
||||
def source_root():
|
||||
return Path(__file__).parent.parent.resolve()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def set_shell(monkeypatch, request):
|
||||
def _set(cls):
|
||||
shell = cls()
|
||||
monkeypatch.setattr('thefuck.shells.shell', shell)
|
||||
request.addfinalizer()
|
||||
return shell
|
||||
|
||||
return _set
|
||||
|
Reference in New Issue
Block a user