mirror of
https://github.com/kk7ds/chirp.git
synced 2024-09-21 02:27:21 +00:00
Add temporary XFAIL test list
This is not to allow excluding drivers from tests, but rather to allow for iterating towards fixes for specific issues. Do not add new lines to this file without justification.
This commit is contained in:
parent
90027b4850
commit
1ccf039871
15
tests/conftest.py
Normal file
15
tests/conftest.py
Normal file
@ -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)
|
8
tests/xfails.txt
Normal file
8
tests/xfails.txt
Normal file
@ -0,0 +1,8 @@
|
||||
# This is a list of tests that are expected to fail. DO NOT add new things to
|
||||
# this file without careful consideration and discussion. This is not a tool
|
||||
# to avoid fixing failures, it is purely a stop-gap to allow temporary
|
||||
# failures to avoid breaking the build while iterating towards a fix.
|
||||
#
|
||||
# One line per test nodeid with a comment above citing a bug number, example:
|
||||
# Bug #10931: FT-450 mem.extra fields cause UI corruption
|
||||
# tests/test_drivers.py::TestCaseBruteForce_Yaesu_FT-450D::test_mode
|
Loading…
Reference in New Issue
Block a user