summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_warnings/data/package_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_warnings/data/package_helper.py')
-rw-r--r--Lib/test/test_warnings/data/package_helper.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_warnings/data/package_helper.py b/Lib/test/test_warnings/data/package_helper.py
new file mode 100644
index 0000000..c22a4f6
--- /dev/null
+++ b/Lib/test/test_warnings/data/package_helper.py
@@ -0,0 +1,10 @@
+# helper to the helper for testing skip_file_prefixes.
+
+import os
+
+package_path = os.path.dirname(__file__)
+
+def inner_api(message, *, stacklevel, warnings_module):
+ warnings_module.warn(
+ message, stacklevel=stacklevel,
+ skip_file_prefixes=(package_path,))