mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
[3.13] gh-128770: raise warnings as errors in test suite - except for test_socket which still logs warnings, and internal test warnings that are now logged (#131802)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
(cherry picked from commit 8a00c9a4d2
)
This commit is contained in:
parent
5c2c817723
commit
07d4c7e7db
15 changed files with 234 additions and 138 deletions
|
@ -24,6 +24,7 @@ you're working through IDLE, you can import this test module and call test()
|
|||
with the corresponding argument.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import math
|
||||
import os, sys
|
||||
import operator
|
||||
|
@ -5932,8 +5933,9 @@ def tearDownModule():
|
|||
if C: C.setcontext(ORIGINAL_CONTEXT[C].copy())
|
||||
P.setcontext(ORIGINAL_CONTEXT[P].copy())
|
||||
if not C:
|
||||
warnings.warn('C tests skipped: no module named _decimal.',
|
||||
UserWarning)
|
||||
logging.getLogger(__name__).warning(
|
||||
'C tests skipped: no module named _decimal.'
|
||||
)
|
||||
if not orig_sys_decimal is sys.modules['decimal']:
|
||||
raise TestFailed("Internal error: unbalanced number of changes to "
|
||||
"sys.modules['decimal'].")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue