Skip to content

Commit 667398f

Browse files
authored
Merge pull request #13481 from mgorny/pass-werror
testing: Explicitly pass `-Werror` to tests needing it
2 parents fa67807 + a3d3918 commit 667398f

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)