Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/python/pyste/tests/inherit4UT.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: 856 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 _inherit4 import *
7
8class TestInherit4(unittest.TestCase):
9
10    def testIt(self):
11        self.assert_(issubclass(B, A))
12        self.assert_(issubclass(C, A))
13        self.assert_(issubclass(C, B))
14        a = A()
15        a.x = 1
16        b = B()
17        b.x = 10
18        b.y = 20
19        c = C()
20        c.x = 100
21        c.y = 200
22        c.z = 300
23        self.assertEqual(a.x, 1)
24        self.assertEqual(b.x, 10)
25        self.assertEqual(b.y, 20)
26        self.assertEqual(c.x, 100)
27        self.assertEqual(c.y, 200)
28        self.assertEqual(c.z, 300)
29
30if __name__ == '__main__':
31    unittest.main()
Note: See TracBrowser for help on using the repository browser.