swig/Examples/test-suite/python/li_factory_runme.py
William S Fulton cf8788c411 Update Python tests to not use flatstaticmethod access
Use Python class staticmethod syntax to access C++ static member functions,
such as Klass.memberfunction, instead of Klass_memberfunction.
Examples and test-suite changes in preparation for issue #2137.
2022-01-14 22:48:11 +00:00

11 lines
223 B
Python

from li_factory import *
circle = Geometry.create(Geometry.CIRCLE)
r = circle.radius()
if (r != 1.5):
raise RuntimeError
point = Geometry.create(Geometry.POINT)
w = point.width()
if (w != 1.0):
raise RuntimeError