mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634)
This commit is contained in:
parent
4f51fa9e2d
commit
a0a6d39295
4 changed files with 70 additions and 0 deletions
|
@ -187,3 +187,13 @@ def save_restore_warnings_filters():
|
|||
yield
|
||||
finally:
|
||||
warnings.filters[:] = old_filters
|
||||
|
||||
|
||||
def _warn_about_deprecation():
|
||||
warnings.warn(
|
||||
"This is used in test_support test to ensure"
|
||||
" support.ignore_deprecations_from() works as expected."
|
||||
" You should not be seeing this.",
|
||||
DeprecationWarning,
|
||||
stacklevel=0,
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue