Implement __repr__ and __eq__ on MjrRect in Python bindings.
PiperOrigin-RevId: 457457401 Change-Id: I0d395ff301fbcf775b4766ac81c830a625b3be63
This commit is contained in:
committed by
Copybara-Service
parent
263c92e301
commit
a077db1b91
@@ -90,5 +90,12 @@ class MuJoCoRenderTest(absltest.TestCase):
|
||||
context.free()
|
||||
context.free()
|
||||
|
||||
def test_mjrrect_repr(self):
|
||||
rect = mujoco.MjrRect(1, 2, 3, 4)
|
||||
rect_repr = repr(rect)
|
||||
self.assertIn('MjrRect', rect_repr)
|
||||
self.assertIn('left: 1', rect_repr)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
absltest.main()
|
||||
|
||||
Reference in New Issue
Block a user