summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/unit/scripts/test_check_coverage.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/scripts/test_check_coverage.py b/tests/unit/scripts/test_check_coverage.py
index efd35ce82..abb0969b6 100644
--- a/tests/unit/scripts/test_check_coverage.py
+++ b/tests/unit/scripts/test_check_coverage.py
@@ -98,7 +98,12 @@ def covtest(testdir, monkeypatch):
# Check if coverage plugin is available
res = testdir.runpytest('--version', '--version')
assert res.ret == 0
+
output = res.stderr.str()
+ if not output:
+ # pytest >= 7.0: https://github.com/pytest-dev/pytest/pull/8247
+ output = res.stdout.str()
+
assert 'This is pytest version' in output
if 'pytest-cov' not in output:
pytest.skip("cov plugin not available")