diff options
| author | Dave Hibberd <d@vehibberd.com> | 2024-01-23 00:29:48 +0000 |
|---|---|---|
| committer | Dave Hibberd <d@vehibberd.com> | 2024-01-23 00:29:48 +0000 |
| commit | bd933b3c7d6b702bebb123511ad55adea01fe102 (patch) | |
| tree | 338699f41163fb2a9727537d4867547424e2dade /tests/conftest.py | |
| parent | f5e142a4e54bfda24bec40e923c643b434948a04 (diff) | |
| parent | 7d3d9d4a1808ea0a76a3263a91de7eee892b42cc (diff) | |
Merge branch 'master' into 'master'
Master
See merge request debian-hamradio-team/chirp!4
Diffstat (limited to 'tests/conftest.py')
| -rw-r--r-- | tests/conftest.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..8026a98 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,15 @@ +import os + +import pytest + + +def pytest_collection_modifyitems(config, items): + xfails = os.path.join(os.path.dirname(__file__), 'xfails.txt') + with open(xfails) as f: + lines = [x.strip() for x in f.readlines() if not x.startswith('#')] + msg = ('Test marked for XFAIL in tests/xfails.txt, but did not fail. ' + 'If this test is now fixed, remove it from the file.') + for item in items: + if item.nodeid in lines: + mark = pytest.mark.xfail(reason=msg) + item.add_marker(mark) |
