diff options
author | Paul Pogonyshev <pogonyshev@gmx.net> | 2008-08-11 20:29:27 +0000 |
---|---|---|
committer | Paul Pogonyshev <paulp@src.gnome.org> | 2008-08-11 20:29:27 +0000 |
commit | 8e21620d279e501fcdcacf6ef6dec6cc7397db0e (patch) | |
tree | bec037850339ea79ee24ef86d840707f6ce48fca /tests | |
parent | 83b468fdf8301da3653032c28b6685f0ef5986f8 (diff) | |
download | pygobject-8e21620d279e501fcdcacf6ef6dec6cc7397db0e.tar.gz |
Bug 540376 – No TypeError raised when type is None
2008-08-11 Paul Pogonyshev <pogonyshev@gmx.net>
Bug 540376 – No TypeError raised when type is None
* gobject/gobjectmodule.c (pyg_signal_new): Add check on second
argument type.
* tests/test_signal.py (TestSignalCreation): New test case.
svn path=/trunk/; revision=942
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_signal.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_signal.py b/tests/test_signal.py index 6c41ece3..96e07312 100644 --- a/tests/test_signal.py +++ b/tests/test_signal.py @@ -17,6 +17,16 @@ class D(C): self.arg2 = arg2 C.do_my_signal(self, arg2) +class TestSignalCreation(unittest.TestCase): + # Bug 540376. + def test_illegals(self): + self.assertRaises(TypeError, lambda: gobject.signal_new('test', + None, + 0, + gobject.TYPE_NONE, + (gobject.TYPE_LONG,))) + + class TestChaining(unittest.TestCase): def setUp(self): self.inst = C() |