summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-04-08 14:53:34 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-04-12 15:25:28 -0300
commitf1286fb409867f5844954b53b0e86b8490267263 (patch)
treef7e1c0685cd8e0c379d4aba66099f0b7c0fdd348
parent4623048983f0c230c47909545cb457018d97951b (diff)
downloadshiboken-f1286fb409867f5844954b53b0e86b8490267263.tar.gz
shiboken-f1286fb409867f5844954b53b0e86b8490267263.tar.xz
shiboken-f1286fb409867f5844954b53b0e86b8490267263.zip
Unit test for multiple derived classes.
-rwxr-xr-xtests/otherbinding/otherderived_test.py28
1 files changed, 26 insertions, 2 deletions
diff --git a/tests/otherbinding/otherderived_test.py b/tests/otherbinding/otherderived_test.py
index 7e8880c3..56a71d7b 100755
--- a/tests/otherbinding/otherderived_test.py
+++ b/tests/otherbinding/otherderived_test.py
@@ -29,8 +29,16 @@
import sys
import unittest
-from sample import Abstract
-from other import OtherDerived
+from sample import Abstract, Derived
+from other import OtherDerived, Number
+
+class Multiple(Derived, Number):
+ def __init__(self):
+ Derived.__init__(self, 42)
+ Number.__init__(self, 42)
+
+ def testCall(self):
+ return True
class OtherDeviant(OtherDerived):
def __init__(self):
@@ -47,6 +55,22 @@ class OtherDeviant(OtherDerived):
def className(self):
return 'OtherDeviant'
+class MultipleTest(unittest.TestCase):
+ '''Test case for Multiple derived class'''
+
+ def testConstructor(self):
+ o = Multiple()
+ self.assert_(isinstance(o, Multiple))
+ self.assert_(isinstance(o, Number))
+ self.assert_(isinstance(o, Derived))
+ del o
+
+ def testMethodCall(self):
+ o = Multiple()
+ self.assert_(o.id_(), 42)
+ self.assert_(o.value(), 42)
+ self.assert_(o.testCall())
+
class OtherDerivedTest(unittest.TestCase):
'''Test case for OtherDerived class'''