Skip to content

Commit a527e14

Browse files
authored
Fix Matrix3_TEST.py on Windows with conda-forge dependencies (#561)
Signed-off-by: Silvio Traversaro <silvio.traversaro@iit.it>
1 parent 416e559 commit a527e14

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/python_pybind11/test/Matrix3_TEST.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,9 @@ def test_to_quaternion(self):
307307
q = Quaterniond(math.pi/2.0, math.pi/2.0, 0)
308308
matFromQuat = Matrix3d(q)
309309
quatFromMat = Quaterniond(matFromQuat)
310-
self.assertTrue(q == quatFromMat)
310+
# We check both cases as quaternion double-cover the rotation matrix
311+
# space, see https://github.com/gazebosim/gz-math/issues/416#issuecomment-1741741183
312+
self.assertTrue(q == quatFromMat or q == -quatFromMat)
311313

312314
# test the cases where matrix trace is negative
313315
# (requires special handling)

0 commit comments

Comments
 (0)