PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/python/typename_runme.py

#
Python | 12 lines | 10 code | 2 blank | 0 comment | 4 complexity | 883e25cbfdbbb4d93a116c6261958fa0 MD5 | raw file
 1import typename
 2import types
 3f = typename.Foo()
 4b = typename.Bar()
 5
 6x = typename.twoFoo(f)
 7if not isinstance(x,types.FloatType):
 8    raise RuntimeError,"Wrong return type (FloatType) !"
 9y = typename.twoBar(b)
10if not isinstance(y,types.IntType):
11    raise RuntimeError,"Wrong return type (IntType)!"
12