From 457ce90b7678b946946f8c2f9ba6250870ec5b55 Mon Sep 17 00:00:00 2001 From: Alexander Fabisch Date: Sun, 24 Nov 2024 19:43:15 +0100 Subject: [PATCH] Explain checks --- pytransform3d/test/test_trajectories.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pytransform3d/test/test_trajectories.py b/pytransform3d/test/test_trajectories.py index b63e7acbf..5d050993c 100644 --- a/pytransform3d/test/test_trajectories.py +++ b/pytransform3d/test/test_trajectories.py @@ -87,12 +87,17 @@ def test_concat_dynamic(): A2Cs = concat_dynamic(A2Bs, B2Cs) for i in range(len(A2Cs)): + # check n_rotations - n_rotations case assert_array_almost_equal(A2Cs[i], concat(A2Bs[i], B2Cs[i])) + # check 1 - 1 case assert_array_almost_equal(A2Cs[i], concat_dynamic(A2Bs[i], B2Cs[i])) + # check 1 - n_rotations case assert_array_almost_equal(concat_dynamic(A2Bs[0], B2Cs), concat_one_to_many(A2Bs[0], B2Cs)) + # check n_rotations - 1 case assert_array_almost_equal(concat_dynamic(A2Bs, B2Cs[0]), concat_many_to_one(A2Bs, B2Cs[0])) + with pytest.raises(ValueError, match="Expected ndim 2 or 3"): concat_dynamic(A2Bs, B2Cs[np.newaxis]) with pytest.raises(ValueError, match="Expected ndim 2 or 3"):