<s> from pathlib import Path <EOL> import pytest <EOL> from thefuck import shells <EOL> from thefuck import conf , const <EOL> shells . shell = shells . Generic ( ) <EOL> def pytest_addoption ( parser ) : <EOL> """<STR_LIT>""" <EOL> group = parser . getgroup ( "<STR_LIT>" ) <EOL> group . addoption ( '<STR_LIT>' , action = "<STR_LIT:store_true>" , default = False , <EOL> help = "<STR_LIT>" ) <EOL> @ pytest . fixture <EOL> def no_memoize ( monkeypatch ) : <EOL> monkeypatch . setattr ( '<STR_LIT>' , True ) <EOL> @ pytest . fixture ( autouse = True ) <EOL> def settings ( request ) : <EOL> def _reset_settings ( ) : <EOL> conf . settings . clear ( ) <EOL> conf . settings . update ( const . DEFAULT_SETTINGS ) <EOL> request . addfinalizer ( _reset_settings ) <EOL> conf . settings . user_dir = Path ( '<STR_LIT>' ) <EOL> return conf . settings <EOL> @ pytest . fixture <EOL> def no_colors ( settings ) : <EOL> settings . no_colors = True <EOL> @ pytest . fixture ( autouse = True ) <EOL> def no_cache ( monkeypatch ) : <EOL> monkeypatch . setattr ( '<STR_LIT>' , True ) <EOL> @ pytest . fixture ( autouse = True ) <EOL> def functional ( request ) : <EOL> if request . node . get_marker ( '<STR_LIT>' ) and not request . config . getoption ( '<STR_LIT>' ) : <EOL> pytest . skip ( '<STR_LIT>' ) <EOL> @ pytest . fixture <EOL> def source_root ( ) : <EOL> return Path ( __file__ ) . parent . parent . resolve ( ) <EOL> @ pytest . fixture <EOL> def set_shell ( monkeypatch , request ) : <EOL> def _set ( cls ) : <EOL> shell = cls ( ) <EOL> monkeypatch . setattr ( '<STR_LIT>' , shell ) <EOL> request . addfinalizer ( ) <EOL> return shell <EOL> return _set </s>
