Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/python/pyste/tests/inherit3UT.py @ 47

Last change on this file since 47 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 769 bytes
Line 
1# Copyright Bruno da Silva de Oliveira 2003. Use, modification and
2# distribution is subject to the Boost Software License, Version 1.0.
3# (See accompanying file LICENSE_1_0.txt or copy at
4# http:#www.boost.org/LICENSE_1_0.txt)
5import unittest
6from _inherit3 import *
7
8class testInherit3(unittest.TestCase):
9
10    def testIt(self):
11        def testInst(c):
12            self.assertEqual(c.x, 0)
13            self.assertEqual(c.foo(3), 3)
14            x = c.X()
15            self.assertEqual(x.y, 0)
16            self.assertEqual(c.E.i, 0)
17            self.assertEqual(c.E.j, 1)
18        b = B()
19        c = C()
20        testInst(b)
21        testInst(c)
22        self.assertEqual(b.foo(), 1)
23        self.assertEqual(c.foo(), 0)
24
25
26if __name__ == '__main__':
27    unittest.main()
Note: See TracBrowser for help on using the repository browser.