diff options
Diffstat (limited to 'tests/samplebinding/typediscovery_test.py')
-rw-r--r-- | tests/samplebinding/typediscovery_test.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/samplebinding/typediscovery_test.py b/tests/samplebinding/typediscovery_test.py index 3c1bfdb98..f7d5433ce 100644 --- a/tests/samplebinding/typediscovery_test.py +++ b/tests/samplebinding/typediscovery_test.py @@ -29,6 +29,7 @@ import unittest from sample import * +from other import * class TypeDiscoveryTest(unittest.TestCase): @@ -42,6 +43,18 @@ class TypeDiscoveryTest(unittest.TestCase): a = Derived.triggerAnotherImpossibleTypeDiscovery() self.assertEqual(type(a), Derived) + def testMultipleInheritance(self): + obj = OtherMultipleDerived.createObject("Base1"); + self.assertEqual(type(obj), Base1) + obj = OtherMultipleDerived.createObject("MDerived1"); + self.assertEqual(type(obj), MDerived1) + obj = OtherMultipleDerived.createObject("SonOfMDerived1"); + self.assertEqual(type(obj), SonOfMDerived1) + obj = OtherMultipleDerived.createObject("MDerived3"); + self.assertEqual(type(obj), MDerived3) + obj = OtherMultipleDerived.createObject("OtherMultipleDerived"); + self.assertEqual(type(obj), OtherMultipleDerived) + if __name__ == '__main__': unittest.main() |