Skip to content

Commit a3d3918

Browse files
mgornybluetech
authored andcommitted
testing: Explicitly pass -Werror to tests needing it
Explicitly pass `-Werror` to `runpytester()` in the few additional tests needing it, in order to fix test failures when the test suite is run with `-Wdefault` or a similar override. Fixes #13480
1 parent 40a1713 commit a3d3918

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

changelog/13480.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed a few test failures in pytest's own test suite when run with ``-Wdefault`` or a similar override.

testing/test_threadexception.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def test_it(request):
211211
"""
212212
)
213213

214-
result = pytester.runpytest()
214+
result = pytester.runpytest("-Werror")
215215

216216
# TODO: should be a test failure or error
217217
assert result.ret == pytest.ExitCode.INTERNAL_ERROR

testing/test_warnings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ def test_func(fix):
149149
)
150150

151151

152+
@pytest.mark.skip("issue #13485")
152153
def test_works_with_filterwarnings(pytester: Pytester) -> None:
153154
"""Ensure our warnings capture does not mess with pre-installed filters (#2430)."""
154155
pytester.makepyfile(

0 commit comments

Comments
 (0)