Skip to content

Commit 8c82f96

Browse files
committed
Added a unittest for __repr__ overload
1 parent 0de7baf commit 8c82f96

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/core_wrapper_features_unittest.py

+8
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,14 @@ def test_local_properties(self):
486486
graphic_params.RaytracingDepth = 5
487487
assert graphic_params.RaytracingDepth == 5
488488

489+
def test_repr_overload(self):
490+
""" Test if repr string is properly returned
491+
"""
492+
p = gp_Pnt(1,2,3)
493+
assert str(p) == "class<'gp_Pnt'>"
494+
shp = BRepPrimAPI_MakeBox(10, 20, 30).Shape()
495+
assert "class<'TopoDS_Shape'; Type:Solid; id:" in str(shp)
496+
489497
def suite():
490498
test_suite = unittest.TestSuite()
491499
test_suite.addTest(unittest.makeSuite(TestWrapperFeatures))

0 commit comments

Comments
 (0)