aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding/voidholder_test.py
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-03-23 12:47:33 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-03-23 13:01:04 -0300
commit26c960fc8e893a4edc655d8548a5ec56f7262bc4 (patch)
tree8a8ebe14958eb4b5bbb1992ceeab25bcd37438f5 /tests/samplebinding/voidholder_test.py
parenta38c294732542b8d25ca1a34856c2ffa4fa2b1ac (diff)
Fixes Converter<void*>::toPython method.
The void* converter transforms a C++ NULL pointer in a Python None. An unit test for this case was added as well. Reviewed by Anderson Lizardo <anderson.lizardo@openbossa.org> Reviewed by Bruno Araújo <bruno.araujo@openbossa.org>
Diffstat (limited to 'tests/samplebinding/voidholder_test.py')
-rwxr-xr-xtests/samplebinding/voidholder_test.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/samplebinding/voidholder_test.py b/tests/samplebinding/voidholder_test.py
index 8d08d1fdf..a6fce2e00 100755
--- a/tests/samplebinding/voidholder_test.py
+++ b/tests/samplebinding/voidholder_test.py
@@ -45,6 +45,12 @@ class VoidHolderTest(unittest.TestCase):
voidholder = VoidHolder(obj)
self.assertEquals(obj, voidholder.voidPointer())
+ def testGetNoneObjectFromVoidHolder(self):
+ '''A VoidHolder created without parameters returns a NULL pointer
+ that should be converted to a Python None.'''
+ voidholder = VoidHolder()
+ self.assertEquals(voidholder.voidPointer(), None)
+
if __name__ == '__main__':
unittest.main()