diff options
author | Chandan Singh <csingh43@bloomberg.net> | 2019-01-15 19:26:07 +0000 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2019-01-15 22:49:01 +0000 |
commit | c91784abcdfebef2e1e70612193b67efe7fa016a (patch) | |
tree | 4545720d78600520adddbcb7d97eb30cfa4d1f08 /conftest.py | |
parent | 80fe0d9a843688e5286ddb819a08fafc1819db93 (diff) | |
download | buildstream-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-x | conftest.py | 2 |
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') |