PageRenderTime 43ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

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

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