PageRenderTime 56ms CodeModel.GetById 34ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1-3-26/SWIG/Examples/test-suite/python/director_enum_runme.py

#
Python | 12 lines | 8 code | 4 blank | 0 comment | 1 complexity | f752bb8b42a015ea9d0b0f06f8201e53 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. import director_enum
  2. class MyFoo(director_enum.Foo):
  3. def say_hi(self, val):
  4. return val
  5. b = director_enum.Foo()
  6. a = MyFoo()
  7. if a.say_hi(director_enum.hello) != b.say_hello(director_enum.hi):
  8. raise RuntimeError