Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/python/pyste/tests/abstract_testUT.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: 722 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 _abstract_test import *
7
8class AbstractTest(unittest.TestCase):
9
10    def testIt(self):
11        class C(A):
12            def f(self):
13                return 'C::f'
14
15        a = A()
16        b = B()
17        c = C()
18        self.assertRaises(RuntimeError, a.f)
19        self.assertEqual(b.f(), 'B::f')
20        self.assertEqual(call(b), 'B::f')
21        self.assertEqual(c.f(), 'C::f')
22        self.assertEqual(call(c), 'C::f') 
23
24
25if __name__ == '__main__':
26    unittest.main()
Note: See TracBrowser for help on using the repository browser.