2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-22 05:22:45 +00:00
Files
python/pyste/tests/example_inheritUT.py
Bruno da Silva de Oliveira a15135f1c1 - Fixed a inheritance bug, and added a test for it.
[SVN r18251]
2003-04-14 23:34:33 +00:00

21 lines
442 B
Python

import unittest
from inherit import *
class InheritExampleTest(unittest.TestCase):
def testIt(self):
a = A_int()
b = B()
self.assert_(isinstance(b, A_int))
self.assert_(issubclass(B, A_int))
a.set(10)
self.assertEqual(a.get(), 10)
b.set(1)
self.assertEqual(b.go(), 1)
self.assertEqual(b.get(), 1)
if __name__ == '__main__':
unittest.main()