aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/registry/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside2/tests/registry/util.py')
-rw-r--r--sources/pyside2/tests/registry/util.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sources/pyside2/tests/registry/util.py b/sources/pyside2/tests/registry/util.py
index d873a7d66..7e048cb24 100644
--- a/sources/pyside2/tests/registry/util.py
+++ b/sources/pyside2/tests/registry/util.py
@@ -91,4 +91,10 @@ def check_warnings():
return True
return False
+def warn(message, category=None, stacklevel=1):
+ """Issue a warning with the default 'RuntimeWarning'"""
+ if category is None:
+ category = UserWarning
+ warnings.warn(message, category, stacklevel)
+
# eof