1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-30 06:34:09 +00:00

Add functional marker

This commit is contained in:
nvbn
2015-09-06 01:13:44 +03:00
parent 8cc19daaaa
commit cdd5f21e88
10 changed files with 35 additions and 37 deletions

View File

@@ -2,6 +2,13 @@ import pytest
from mock import Mock
def pytest_addoption(parser):
"""Adds `--run-without-docker` argument."""
group = parser.getgroup("thefuck")
group.addoption('--enable-functional', action="store_true", default=False,
help="Enable functional tests")
@pytest.fixture
def no_memoize(monkeypatch):
monkeypatch.setattr('thefuck.utils.memoize.disabled', True)
@@ -15,3 +22,10 @@ def settings():
@pytest.fixture(autouse=True)
def no_cache(monkeypatch):
monkeypatch.setattr('thefuck.utils.cache.disabled', True)
@pytest.fixture(autouse=True)
def functional(request):
if request.node.get_marker('functional') \
and not request.config.getoption('enable_functional'):
pytest.skip('functional tests are disabled')