diff --git a/requirements-dev.txt b/requirements-dev.txt index 8086112ad..2ac5dd064 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ -r requirements.txt -r requirements-optional.txt -pytest>=3.2.5 +pytest>=3.6 flake8 protobuf isort diff --git a/trezorlib/tests/device_tests/conftest.py b/trezorlib/tests/device_tests/conftest.py index 7bdfc2dad..bfc5d5cf2 100644 --- a/trezorlib/tests/device_tests/conftest.py +++ b/trezorlib/tests/device_tests/conftest.py @@ -111,17 +111,17 @@ def pytest_runtest_setup(item): * no test should have both skips at the same time * allows to 'runxfail' tests specified by 'run_xfail' in pytest.ini """ - if item.get_marker("skip_t1") and item.get_marker("skip_t2"): + if item.get_closest_marker("skip_t1") and item.get_closest_marker("skip_t2"): pytest.fail("Don't skip tests for both trezors!") - if item.get_marker("skip_t2") and TREZOR_VERSION == 2: + if item.get_closest_marker("skip_t2") and TREZOR_VERSION == 2: pytest.skip("Test excluded on Trezor T") - if item.get_marker("skip_t1") and TREZOR_VERSION == 1: + if item.get_closest_marker("skip_t1") and TREZOR_VERSION == 1: pytest.skip("Test excluded on Trezor 1") - xfail = item.get_marker("xfail") + xfail = item.get_closest_marker("xfail") runxfail_markers = item.config.getini("run_xfail") - run_xfail = any(item.get_marker(marker) for marker in runxfail_markers) + run_xfail = any(item.get_closest_marker(marker) for marker in runxfail_markers) if xfail and run_xfail: # Deep hack: pytest's private _evalxfail helper determines whether the test should xfail or not. # The helper caches its result even before this hook runs.