diff options
Diffstat (limited to 'Lib/test/warning_tests.py')
-rw-r--r-- | Lib/test/warning_tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/warning_tests.py b/Lib/test/warning_tests.py new file mode 100644 index 0000000..d0519ef --- /dev/null +++ b/Lib/test/warning_tests.py @@ -0,0 +1,9 @@ +# 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) |