summaryrefslogtreecommitdiff
path: root/conftest.py
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2019-01-15 19:26:07 +0000
committerJavier Jardón <jjardon@gnome.org>2019-01-15 22:49:01 +0000
commitc91784abcdfebef2e1e70612193b67efe7fa016a (patch)
tree4545720d78600520adddbcb7d97eb30cfa4d1f08 /conftest.py
parent80fe0d9a843688e5286ddb819a08fafc1819db93 (diff)
downloadbuildstream-c91784abcdfebef2e1e70612193b67efe7fa016a.tar.gz
conftest.py: Don't use deprecated get_marker() functionchandan/fix-pytest-get-marker
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.
Diffstat (limited to 'conftest.py')
-rwxr-xr-xconftest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/conftest.py b/conftest.py
index f3c09a5fb..b0b1e280e 100755
--- a/conftest.py
+++ b/conftest.py
@@ -32,7 +32,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')