From b4c75eebe6078040d511437424b9a8616a3a027f Mon Sep 17 00:00:00 2001 From: Kartik Soneji Date: Tue, 3 Nov 2020 22:59:28 +0530 Subject: [PATCH] Fix pytest warnings (#1116) * Add custom pytest mark. * Fix typo usefixture -> usefixtures. --- tests/conftest.py | 4 ++++ tests/test_conf.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 3d09715..964458b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,6 +7,10 @@ from thefuck.system import Path shells.shell = shells.Generic() +def pytest_configure(config): + config.addinivalue_line("markers", "functional: mark test as functional") + + def pytest_addoption(parser): """Adds `--enable-functional` argument.""" group = parser.getgroup("thefuck") diff --git a/tests/test_conf.py b/tests/test_conf.py index 7d0fe4b..657e475 100644 --- a/tests/test_conf.py +++ b/tests/test_conf.py @@ -43,7 +43,7 @@ class TestSettingsFromFile(object): assert settings.rules == const.DEFAULT_RULES + ['test'] -@pytest.mark.usefixture('load_source') +@pytest.mark.usefixtures('load_source') class TestSettingsFromEnv(object): def test_from_env(self, os_environ, settings): os_environ.update({'THEFUCK_RULES': 'bash:lisp',