PageRenderTime 35ms CodeModel.GetById 32ms app.highlight 1ms 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
 1import director_enum
 2
 3class MyFoo(director_enum.Foo):
 4  def say_hi(self, val):
 5    return val
 6
 7
 8b = director_enum.Foo()
 9a = MyFoo()
10
11if a.say_hi(director_enum.hello) != b.say_hello(director_enum.hi):
12  raise RuntimeError