diff options
author | Chandan Singh <csingh43@bloomberg.net> | 2019-01-15 19:26:07 +0000 |
---|---|---|
committer | Chandan Singh <csingh43@bloomberg.net> | 2019-01-19 14:05:03 +0000 |
commit | aa983200b1e34da2acd69ba47622fb7e7f200e87 (patch) | |
tree | b00547e85e81b07d285b0cf4b9d0dadde4f3db4b /conftest.py | |
parent | 2a50a3db153f004c44d803c249ed3039060aecb6 (diff) | |
download | buildstream-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)
Diffstat (limited to 'conftest.py')
-rwxr-xr-x | conftest.py | 2 |
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') |