Skip to content

Commit a7462c6

Browse files
committed
testing: ignore warning entirely otherwise it interferes with the fnmatching
1 parent 6274c3c commit a7462c6

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

testing/test_xfail_behavior.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ def test_xfail(is_crashing, is_strict, testdir):
112112
113113
import pytest
114114
115+
# The current implementation emits RuntimeWarning.
116+
pytestmark = pytest.mark.filterwarnings('ignore:pytest-forked xfail')
117+
115118
@pytest.mark.xfail(
116119
reason='The process gets terminated',
117120
strict={is_strict!s},
@@ -123,9 +126,5 @@ def test_function():
123126
format(**locals())
124127
)
125128

126-
pytest_run_result = testdir.runpytest(
127-
test_module,
128-
'-ra',
129-
'-p', 'no:warnings', # the current implementation emits RuntimeWarning
130-
)
129+
pytest_run_result = testdir.runpytest(test_module, '-ra')
131130
pytest_run_result.stdout.fnmatch_lines(expected_lines)

0 commit comments

Comments
 (0)