diff options
author | Johan Dahlin <johan@gnome.org> | 2007-04-30 02:43:37 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2007-04-30 02:43:37 +0000 |
commit | 958b9aa52ce7a5c774f26f92adea06579242b28a (patch) | |
tree | 2b76e24a5e12a25cc03bd7b1298b933b08db0a2f /tests/test_gtype.py | |
parent | 7da08ab393e14d020d77d3e67db4edbc2742e95f (diff) | |
download | pygobject-958b9aa52ce7a5c774f26f92adea06579242b28a.tar.gz pygobject-958b9aa52ce7a5c774f26f92adea06579242b28a.tar.xz pygobject-958b9aa52ce7a5c774f26f92adea06579242b28a.zip |
Treat None in a GValueArray as pointer/NULL, patch by Ed Catmur, fixes
2007-04-29 Johan Dahlin <johan@gnome.org>
* gobject/pygtype.c: (pyg_value_array_from_pyobject):
* tests/test_gtype.py:
* tests/testhelpermodule.c: (_wrap_test_value_array):
Treat None in a GValueArray as pointer/NULL, patch by
Ed Catmur, fixes #352209.
svn path=/trunk/; revision=656
Diffstat (limited to 'tests/test_gtype.py')
-rw-r--r-- | tests/test_gtype.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_gtype.py b/tests/test_gtype.py index 52efda4..cbf3e1c 100644 --- a/tests/test_gtype.py +++ b/tests/test_gtype.py @@ -1,7 +1,7 @@ import unittest from gobject import GType -from common import gobject +from common import gobject, testhelper class GTypeTest(unittest.TestCase): def checkType(self, expected, *objects): @@ -54,6 +54,14 @@ class GTypeTest(unittest.TestCase): def testObject(self): self.checkType(gobject.TYPE_OBJECT, 'PyObject') + def testValueArray(self): + array = [1, 2, 3, "foo", True] + self.assertEqual(array, testhelper.test_value_array(array)) + + def testValueArrayNone(self): + array = [1, 2, 3, "foo", True, None] + self.assertEqual(array, testhelper.test_value_array(array)) + # XXX: Flags, Enums class MyObject(gobject.GObject): |