summaryrefslogtreecommitdiff
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorYogeswaran Umasankar <kd8mbd@gmail.com>2024-01-20 20:25:00 +0000
committerYogeswaran Umasankar <kd8mbd@gmail.com>2024-01-20 20:25:00 +0000
commite5ac17f663e108f458b5e3d34bfcc85b2d0482bc (patch)
tree13f52b05b717ade7f8ba982ee1d910834067c0c6 /tests/conftest.py
parentf5e142a4e54bfda24bec40e923c643b434948a04 (diff)
parentac8027c43c9df4431092d633a06bd5bd92341247 (diff)
Update upstream source from tag 'upstream/1%20240117'
Update to upstream version '1:20240117' with Debian dir 8d8fe4e002b178241b01b8f9b69615aa2480698f
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py15
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)