Skip to content
Snippets Groups Projects
Commit aa983200 authored by Chandan Singh's avatar Chandan Singh
Browse files

conftest.py: Don't use deprecated get_marker() function

Starting from `pytest` version 4.1.0, `Node.get_marker()` has been
removed, and hence our tests break when running with newer versions of
`pytest`. It was deprecated since a while back but it has recently been
removed completely. Use `get_closest_marker()` as a replacement that is
suggested in the changelog, and seems to work fine for our use case.

See https://github.com/pytest-dev/pytest/pull/4564 for more context on
the upstream issue.

One way of verifying this change is that this should fix the recently
added `tests-fedora-update-deps` job, that was failing before due to
this issue.

(cherry picked from commit c91784ab)
parent 2a50a3db
No related branches found
No related tags found
1 merge request!1111Run tests using tox
......@@ -30,7 +30,7 @@ def pytest_addoption(parser):
def pytest_runtest_setup(item):
if item.get_marker('integration') and not item.config.getvalue('integration'):
if item.get_closest_marker('integration') and not item.config.getvalue('integration'):
pytest.skip('skipping integration test')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment