summaryrefslogtreecommitdiff
path: root/tests/test_everything.py
diff options
context:
space:
mode:
authorGarrett Regier <garrett.regier@riftio.com>2015-01-19 14:53:53 -0800
committerGarrett Regier <garrett.regier@riftio.com>2015-01-24 22:15:16 -0800
commita4160892dd28ab1d656cef4d4059f3b3f95caf4a (patch)
treee501e563c16add370da7b583fd8153ed551b212c /tests/test_everything.py
parentef3bff4e570363e4f383d4cdae9cecd4073b03d8 (diff)
downloadpygobject-a4160892dd28ab1d656cef4d4059f3b3f95caf4a.tar.gz
Allows passing arguments to opaque Boxed types
https://bugzilla.gnome.org/show_bug.cgi?id=743214
Diffstat (limited to 'tests/test_everything.py')
-rw-r--r--tests/test_everything.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_everything.py b/tests/test_everything.py
index 741de1ae..88b6da14 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -1096,6 +1096,15 @@ class TestBoxed(unittest.TestCase):
self.assertTrue(boxed42_2.equals(boxed42))
self.assertTrue(boxed42.equals(boxed42))
+ def test_boxed_b_constructor(self):
+ with warnings.catch_warnings(record=True) as warn:
+ warnings.simplefilter('always')
+ boxed = Everything.TestBoxedB(42, 47)
+ self.assertTrue(issubclass(warn[0].category, TypeError))
+
+ self.assertEqual(boxed.some_int8, 0)
+ self.assertEqual(boxed.some_long, 0)
+
def test_boxed_c_equality(self):
boxed = Everything.TestBoxedC()
# TestBoxedC uses refcounting, so we know that