swig/Examples/test-suite/python/using_member_runme.py
Olly Betts 25f996a5c8 [python] Replace uses of assert in testsuite
We're not supposed to assert for this, as mentioned in #1488.
2022-01-30 13:38:56 +13:00

14 lines
333 B
Python

from using_member import *
def swig_assert_equal(a, b):
if a != b:
raise RuntimeError(str(a) + " != " + str(b))
b = B()
swig_assert_equal(b.get(int(1)), 10)
swig_assert_equal(b.get(float(1)), 20)
bb = BB()
swig_assert_equal(bb.greater(int(1)), 0)
swig_assert_equal(bb.greater(float(1)), 1)
swig_assert_equal(bb.great(True), 2)