summaryrefslogtreecommitdiff
path: root/tests/test_source.py
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:50:39 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:50:42 +0900
commitf3eae5a895fc60cb99c0c366bdd011018ce3bc7b (patch)
tree05145bd5ec6ec44e6cb9d5604ade02923e66d6a0 /tests/test_source.py
parent942efc88315506d2a299ae79d05fa8dfe00f8166 (diff)
downloadpygobject2-f3eae5a895fc60cb99c0c366bdd011018ce3bc7b.tar.gz
pygobject2-f3eae5a895fc60cb99c0c366bdd011018ce3bc7b.tar.bz2
pygobject2-f3eae5a895fc60cb99c0c366bdd011018ce3bc7b.zip
Imported Upstream version 3.9.92upstream/3.9.92upstream
Change-Id: I568bb088bda84501eabdd8ad9d0224c88b73695e Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'tests/test_source.py')
-rw-r--r--tests/test_source.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_source.py b/tests/test_source.py
index 5b3b51b..d0e28e4 100644
--- a/tests/test_source.py
+++ b/tests/test_source.py
@@ -214,6 +214,17 @@ class TestSource(unittest.TestCase):
del source
self.assertTrue(self.finalized)
+ def test_extra_init_args(self):
+ class SourceWithInitArgs(GLib.Source):
+ def __init__(self, arg, kwarg=None):
+ super(SourceWithInitArgs, self).__init__()
+ self.arg = arg
+ self.kwarg = kwarg
+
+ source = SourceWithInitArgs(1, kwarg=2)
+ self.assertEqual(source.arg, 1)
+ self.assertEqual(source.kwarg, 2)
+
class TestUserData(unittest.TestCase):
def test_idle_no_data(self):