Skip to content

Commit 427f57f

Browse files
committed
better tests
1 parent 873d8b2 commit 427f57f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/compas/robots/test_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_robot_urdf_namespaces_to_string():
108108
r = RobotModel.from_urdf_string(
109109
"""<?xml version="1.0" encoding="UTF-8"?><robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="panda"><xacro:bamboo/></robot>""")
110110
urdf_string = URDF.from_robot(r).to_string(prettify=True)
111-
assert r.__class__ == RobotModel
111+
assert isinstance(r, RobotModel)
112112
assert b'xmlns:xacro="http://www.ros.org/wiki/xacro"' in urdf_string
113113
assert b'<xacro:bamboo' in urdf_string or b'<ns0:bamboo' in urdf_string
114114
# Note: Minidom does some funny things to namespaces. First, if a namespace isn't used, it will be stripped out.
@@ -120,7 +120,7 @@ def test_robot_urdf_namespaces_to_string():
120120
def test_robot_default_namespace(reason="Default parser namespace issues"):
121121
r = RobotModel.from_urdf_string(
122122
"""<?xml version="1.0" encoding="UTF-8"?><robot xmlns="https://drake.mit.edu" name="Acrobot"><frame/></robot>""")
123-
assert r.__class__ == RobotModel
123+
assert isinstance(r, RobotModel)
124124
assert r.name == 'Acrobot'
125125

126126

0 commit comments

Comments
 (0)