summaryrefslogtreecommitdiff
path: root/Lib/test/support/warnings_helper.py
diff options
context:
space:
mode:
authorŁukasz Langa <lukasz@langa.pl>2021-08-17 12:01:00 +0200
committerGitHub <noreply@github.com>2021-08-17 12:01:00 +0200
commitbc98f981326d7cb30f939dedd04b91f378255d88 (patch)
treed4897d6c85fc9cc5626b91ec0f73d49b1c6ed62a /Lib/test/support/warnings_helper.py
parent6f6648e436d02bce0e49ba82f4377c0d2f586f0f (diff)
downloadcpython-git-bc98f981326d7cb30f939dedd04b91f378255d88.tar.gz
[3.10] bpo-44852: Support ignoring specific DeprecationWarnings wholesale in regrtest (GH-27634) (GH-27784)
(cherry picked from commit a0a6d39295a30434b088f4b66439bf5ea21a3e4e) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
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 de23e6b452..a024fbe5be 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,
+ )