diff --git a/misc/requirements/requirements-pyroma.txt b/misc/requirements/requirements-pyroma.txt index 241273169..6afd097f9 100644 --- a/misc/requirements/requirements-pyroma.txt +++ b/misc/requirements/requirements-pyroma.txt @@ -1,4 +1,4 @@ # This file is automatically generated by scripts/dev/recompile_requirements.py docutils==0.14 -pyroma==2.3 +pyroma==2.3.1 diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt index a2d4df525..3105679c4 100644 --- a/misc/requirements/requirements-tests.txt +++ b/misc/requirements/requirements-tests.txt @@ -16,22 +16,22 @@ itsdangerous==0.24 # Jinja2==2.10 Mako==1.0.7 # MarkupSafe==1.0 -more-itertools==4.1.0 -parse==1.8.2 +more-itertools==4.2.0 +parse==1.8.4 parse-type==0.4.2 pluggy==0.6.0 py==1.5.3 py-cpuinfo==4.0.0 -pytest==3.5.1 +pytest==3.6.0 pytest-bdd==2.21.0 pytest-benchmark==3.1.1 pytest-cov==2.5.1 pytest-faulthandler==1.5.0 pytest-instafail==0.4.0 pytest-mock==1.10.0 -pytest-qt==2.3.2 +pytest-qt==2.4.0 pytest-repeat==0.4.1 -pytest-rerunfailures==4.0 +pytest-rerunfailures==4.1 pytest-travis-fold==1.3.0 pytest-xvfb==1.1.0 PyVirtualDisplay==0.2.1 diff --git a/tests/conftest.py b/tests/conftest.py index 0b82bc7f6..71bc9f388 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -80,7 +80,7 @@ def _apply_platform_markers(config, item): ] for searched_marker, condition, default_reason in markers: - marker = item.get_marker(searched_marker) + marker = item.get_closest_marker(searched_marker) if not marker or not condition: continue @@ -138,9 +138,9 @@ def pytest_collection_modifyitems(config, items): item.add_marker(pytest.mark.end2end) _apply_platform_markers(config, item) - if item.get_marker('xfail_norun'): + if list(item.iter_markers('xfail_norun')): item.add_marker(pytest.mark.xfail(run=False)) - if item.get_marker('js_prompt'): + if list(item.iter_markers('js_prompt')): if config.webengine: item.add_marker(pytest.mark.skipif( PYQT_VERSION <= 0x050700, @@ -226,7 +226,7 @@ def set_backend(monkeypatch, request): @pytest.fixture(autouse=True) def apply_fake_os(monkeypatch, request): - fake_os = request.node.get_marker('fake_os') + fake_os = request.node.get_closest_marker('fake_os') if not fake_os: return diff --git a/tests/end2end/conftest.py b/tests/end2end/conftest.py index 5226396a3..136d6eb67 100644 --- a/tests/end2end/conftest.py +++ b/tests/end2end/conftest.py @@ -151,7 +151,7 @@ def pytest_collection_modifyitems(config, items): for item in items: for name, prefix, pytest_mark, condition in markers: - marker = item.get_marker(name) + marker = item.get_closest_marker(name) if marker and condition: if marker.args: text = '{}: {}'.format(prefix, marker.args[0]) diff --git a/tests/end2end/fixtures/quteprocess.py b/tests/end2end/fixtures/quteprocess.py index 0c560cf51..7311c7b38 100644 --- a/tests/end2end/fixtures/quteprocess.py +++ b/tests/end2end/fixtures/quteprocess.py @@ -394,7 +394,7 @@ class QuteProc(testprocess.Process): elif (is_ignored_qt_message(self.request.config, line) or is_ignored_lowlevel_message(line) or is_ignored_chromium_message(line) or - self.request.node.get_marker('no_invalid_lines')): + list(self.request.node.iter_markers('no_invalid_lines'))): self._log("IGNORED: {}".format(line)) return None else: @@ -501,7 +501,7 @@ class QuteProc(testprocess.Process): """Extend wait_for to add divisor if a test is xfailing.""" __tracebackhide__ = (lambda e: e.errisinstance(testprocess.WaitForTimeout)) - xfail = self.request.node.get_marker('xfail') + xfail = self.request.node.get_closest_marker('xfail') if xfail and (not xfail.args or xfail.args[0]): kwargs['divisor'] = 10 else: diff --git a/tests/end2end/fixtures/test_quteprocess.py b/tests/end2end/fixtures/test_quteprocess.py index 9aab0aa0f..a0dcaf5ce 100644 --- a/tests/end2end/fixtures/test_quteprocess.py +++ b/tests/end2end/fixtures/test_quteprocess.py @@ -68,7 +68,7 @@ class FakeNode: def __init__(self, call): self.rep_call = call - def get_marker(self, _name): + def get_closest_marker(self, _name): return None