summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandan Singh <csingh43@bloomberg.net>2019-01-15 19:26:07 +0000
committerChandan Singh <csingh43@bloomberg.net>2019-01-19 14:05:03 +0000
commitaa983200b1e34da2acd69ba47622fb7e7f200e87 (patch)
treeb00547e85e81b07d285b0cf4b9d0dadde4f3db4b
parent2a50a3db153f004c44d803c249ed3039060aecb6 (diff)
downloadbuildstream-aa983200b1e34da2acd69ba47622fb7e7f200e87.tar.gz
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 c91784abcdfebef2e1e70612193b67efe7fa016a)
-rwxr-xr-xconftest.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/conftest.py b/conftest.py
index 99a602db4..193bef02d 100755
--- a/conftest.py
+++ b/conftest.py
@@ -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')