diff options
author | James Livingstone <doclivingstone@gmail.com> | 2007-04-30 02:50:06 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2007-04-30 02:50:06 +0000 |
commit | d96aaf253b925d4e84374f5c7e79398c21eff72f (patch) | |
tree | 7952699d708c6034cc1051db3bef0717e698c320 /tests/test_signal.py | |
parent | 958b9aa52ce7a5c774f26f92adea06579242b28a (diff) | |
download | pygobject-d96aaf253b925d4e84374f5c7e79398c21eff72f.tar.gz |
reviewed by: Johan Dahlin <johan@gnome.org>
2007-04-29 James Livingstone <doclivingstone@gmail.com>
reviewed by: Johan Dahlin <johan@gnome.org>
* gobject/pygtype.c: (pyg_value_from_pyobject):
* tests/test_signal.py:
Add a missing else to avoid throwing a TypeError.
Includes a test written by Ed Catmur.
Fixes #374653
svn path=/trunk/; revision=657
Diffstat (limited to 'tests/test_signal.py')
-rw-r--r-- | tests/test_signal.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_signal.py b/tests/test_signal.py index 99bb45b3..6c41ece3 100644 --- a/tests/test_signal.py +++ b/tests/test_signal.py @@ -2,6 +2,7 @@ import gc import unittest +import sys from common import gobject, testhelper @@ -364,5 +365,19 @@ else: print '** WARNING: LIBFFI disabled, not testing' print +# Test for 374653 +class TestPyGValue(unittest.TestCase): + def testNoneNULLBoxedConversion(self): + class C(gobject.GObject): + __gsignals__ = dict(my_boxed_signal=( + gobject.SIGNAL_RUN_LAST, + gobject.type_from_name('GStrv'), ())) + + obj = C() + obj.connect('my-boxed-signal', lambda obj: None) + sys.last_type = None + obj.emit('my-boxed-signal') + assert not sys.last_type + if __name__ == '__main__': unittest.main() |