1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-07 04:14:01 +01:00

Fix pytest warnings (#1116)

* Add custom pytest mark.

* Fix typo usefixture -> usefixtures.
This commit is contained in:
Kartik Soneji
2020-11-03 22:59:28 +05:30
committed by GitHub
parent 22efa8f70e
commit b4c75eebe6
2 changed files with 5 additions and 1 deletions

View File

@@ -7,6 +7,10 @@ from thefuck.system import Path
shells.shell = shells.Generic() shells.shell = shells.Generic()
def pytest_configure(config):
config.addinivalue_line("markers", "functional: mark test as functional")
def pytest_addoption(parser): def pytest_addoption(parser):
"""Adds `--enable-functional` argument.""" """Adds `--enable-functional` argument."""
group = parser.getgroup("thefuck") group = parser.getgroup("thefuck")

View File

@@ -43,7 +43,7 @@ class TestSettingsFromFile(object):
assert settings.rules == const.DEFAULT_RULES + ['test'] assert settings.rules == const.DEFAULT_RULES + ['test']
@pytest.mark.usefixture('load_source') @pytest.mark.usefixtures('load_source')
class TestSettingsFromEnv(object): class TestSettingsFromEnv(object):
def test_from_env(self, os_environ, settings): def test_from_env(self, os_environ, settings):
os_environ.update({'THEFUCK_RULES': 'bash:lisp', os_environ.update({'THEFUCK_RULES': 'bash:lisp',