diff options
Diffstat (limited to 'tests/test_glib.py')
-rw-r--r-- | tests/test_glib.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_glib.py b/tests/test_glib.py index 995d8471..f9e48536 100644 --- a/tests/test_glib.py +++ b/tests/test_glib.py @@ -229,3 +229,10 @@ https://my.org/q?x=1&y=2 def test_timezone_constructor_error(self): self.assertRaisesRegexp(TypeError, '.*constructor.*help\(GLib.TimeZone\).*', GLib.TimeZone) + + def test_source_attach_implicit_context(self): + context = GLib.MainContext.default() + source = GLib.Idle() + source_id = source.attach() + self.assertEqual(context, source.get_context()) + self.assertTrue(GLib.Source.remove(source_id)) |