summaryrefslogtreecommitdiff
path: root/tests/test_overrides_gio.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_overrides_gio.py')
-rw-r--r--tests/test_overrides_gio.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_overrides_gio.py b/tests/test_overrides_gio.py
index b6516f9b..8612d51e 100644
--- a/tests/test_overrides_gio.py
+++ b/tests/test_overrides_gio.py
@@ -2,10 +2,12 @@ from __future__ import absolute_import
import random
import platform
+import warnings
import pytest
from gi.repository import Gio, GObject
+from gi import PyGIWarning
from gi._compat import cmp
@@ -344,3 +346,16 @@ def test_action_map_add_action_entries():
actionmap.activate_action("simple")
assert test_data[0] == 'test back'
+
+
+def test_types_init_warn():
+ types = [
+ Gio.DBusAnnotationInfo, Gio.DBusArgInfo, Gio.DBusMethodInfo,
+ Gio.DBusSignalInfo, Gio.DBusInterfaceInfo, Gio.DBusNodeInfo,
+ ]
+
+ for t in types:
+ with warnings.catch_warnings(record=True) as warn:
+ warnings.simplefilter('always')
+ t()
+ assert issubclass(warn[0].category, PyGIWarning)