/trunk/Examples/test-suite/python/typename_runme.py
# · Python · 12 lines · 10 code · 2 blank · 0 comment · 2 complexity · 883e25cbfdbbb4d93a116c6261958fa0 MD5 · raw file
- import typename
- import types
- f = typename.Foo()
- b = typename.Bar()
- x = typename.twoFoo(f)
- if not isinstance(x,types.FloatType):
- raise RuntimeError,"Wrong return type (FloatType) !"
- y = typename.twoBar(b)
- if not isinstance(y,types.IntType):
- raise RuntimeError,"Wrong return type (IntType)!"