/tags/rel-1.3.35/Examples/test-suite/python/overload_subtype_runme.py

# · Python · 11 lines · 7 code · 4 blank · 0 comment · 2 complexity · 054d025bcf99c4ff5f9890954cdec89e MD5 · raw file

  1. from overload_subtype import *
  2. f = Foo()
  3. b = Bar()
  4. if spam(f) != 1:
  5. raise RuntimeError, "foo"
  6. if spam(b) != 2:
  7. raise RuntimeError, "bar"