1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -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")

View File

@ -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',