From 891cbb41f9be3074549ff93cda3db22210bb1321 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Sun, 27 Sep 2020 23:33:36 +0300 Subject: Add comparison tests --- iss/tests/conftest.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 iss/tests/conftest.py (limited to 'iss/tests/conftest.py') diff --git a/iss/tests/conftest.py b/iss/tests/conftest.py new file mode 100644 index 0000000..b4ca80c --- /dev/null +++ b/iss/tests/conftest.py @@ -0,0 +1,20 @@ +import pytest + + +def pytest_addoption(parser): + parser.addoption( + "--compare", action="store_true", default=False, help="Run compare tests" + ) + + +def pytest_configure(config): + config.addinivalue_line("markers", "compare: mark test as a comparison test") + + +def pytest_collection_modifyitems(config, items): + if config.getoption("--compare"): + return + skip_compare = pytest.mark.skip(reason="need --compare option to run") + for item in items: + if "compare" in item.keywords: + item.add_marker(skip_compare) -- cgit v1.3.1