PageRenderTime 53ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Python | 15 lines | 10 code | 5 blank | 0 comment | 1 complexity | 9220b22a78ea3061402c4efc59847f3e MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. from director_thread import Foo
  2. class Derived(Foo) :
  3. def __init__(self):
  4. Foo.__init__(self)
  5. def do_foo(self):
  6. self.val -= 1
  7. d = Derived()
  8. d.run()
  9. if d.val >= 0:
  10. raise RuntimeError