summaryrefslogtreecommitdiffstats
path: root/Lib/test/warning_tests.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2015-09-06 07:39:37 (GMT)
committerLarry Hastings <larry@hastings.org>2015-09-06 07:39:37 (GMT)
commit714e49371b8d73059cf19f92a8566dcd20c6089a (patch)
tree1a90551d36b0ebe9b760ec948fe7bd3e5c6d0cee /Lib/test/warning_tests.py
parent62b24624dd3eec75869372e08d5ecbc4b8976101 (diff)
downloadcpython-714e49371b8d73059cf19f92a8566dcd20c6089a.zip
cpython-714e49371b8d73059cf19f92a8566dcd20c6089a.tar.gz
cpython-714e49371b8d73059cf19f92a8566dcd20c6089a.tar.bz2
Issue #24305: Prevent import subsystem stack frames from being counted
by the warnings.warn(stacklevel=) parameter.
Diffstat (limited to 'Lib/test/warning_tests.py')
-rw-r--r--Lib/test/warning_tests.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/Lib/test/warning_tests.py b/Lib/test/warning_tests.py
deleted file mode 100644
index d0519ef..0000000
--- a/Lib/test/warning_tests.py
+++ /dev/null
@@ -1,9 +0,0 @@
-# Helper module for testing the skipmodules argument of warnings.warn()
-
-import warnings
-
-def outer(message, stacklevel=1):
- inner(message, stacklevel)
-
-def inner(message, stacklevel=1):
- warnings.warn(message, stacklevel=stacklevel)