summaryrefslogtreecommitdiffstats
path: root/Lib/test/support/warnings_helper.py
diff options
context:
space:
mode:
authorƁukasz Langa <lukasz@langa.pl>2021-08-16 18:13:51 (GMT)
committerGitHub <noreply@github.com>2021-08-16 18:13:51 (GMT)
commita0a6d39295a30434b088f4b66439bf5ea21a3e4e (patch)
tree08b366841c38162dfd67de19bd289bd931712d5a /Lib/test/support/warnings_helper.py
parent4f51fa9e2d3ea9316e674fb9a9f3e3112e83661c (diff)
downloadcpython-a0a6d39295a30434b088f4b66439bf5ea21a3e4e.zip
cpython-a0a6d39295a30434b088f4b66439bf5ea21a3e4e.tar.gz
cpython-a0a6d39295a30434b088f4b66439bf5ea21a3e4e.tar.bz2
bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634)
Diffstat (limited to 'Lib/test/support/warnings_helper.py')
-rw-r--r--Lib/test/support/warnings_helper.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/support/warnings_helper.py b/Lib/test/support/warnings_helper.py
index de23e6b..a024fbe 100644
--- a/Lib/test/support/warnings_helper.py
+++ b/Lib/test/support/warnings_helper.py
@@ -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,
+ )