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 _wrappertest import * 7 8class WrapperTest(unittest.TestCase): 9 10 def testIt(self): 11 self.assertEqual(Range(10), range(10)) 12 self.assertEqual(C().Mul(10), [x*10 for x in range(10)]) 13 14 a = A() 15 self.assertEqual(a.f(), 10) 16 self.assertEqual(call_foo(a), 10) 17 class D(A): 18 def f(self): return 2 19 d = D() 20 self.assertEqual(d.f(), 2) 21 self.assertEqual(call_foo(d), 2) 22 23if __name__ == '__main__': 24 unittest.main() 25