aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-01-11 14:03:45 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-01-11 14:03:45 -0200
commit9e7c52bbef25fb118452aacae4f8e05ca5c9cf9a (patch)
tree18ea055dd176b5e1c713b7ce1adf99e4409d033e
parentef6fff7e7cacd4bee51afe64d4301e228ab2eade (diff)
Added tests for the bug related to tp_new vs tp_init problem.
-rwxr-xr-xtests/samplebinding/nondefaultctor_test.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/samplebinding/nondefaultctor_test.py b/tests/samplebinding/nondefaultctor_test.py
index 6b4e88c6b..d3757cb56 100755
--- a/tests/samplebinding/nondefaultctor_test.py
+++ b/tests/samplebinding/nondefaultctor_test.py
@@ -34,7 +34,10 @@ from sample import NonDefaultCtor
class DerivedNonDefaultCtor (NonDefaultCtor):
def returnMyselfVirtual(self):
return NonDefaultCtor(self.value()+1)
- pass
+
+class AnotherDerivedNonDefaultCtor (NonDefaultCtor):
+ def __init__(self, some_string):
+ pass
class NonDefaultCtorTest(unittest.TestCase):
@@ -55,6 +58,8 @@ class NonDefaultCtorTest(unittest.TestCase):
self.assertEqual(c.returnMyselfVirtual().value(), 4)
self.assertEqual(c.callReturnMyselfVirtual().value(), 4)
+ def testCtorOverload(self):
+ c = AnotherDerivedNonDefaultCtor("testing")
if __name__ == '__main__':
unittest.main()