Skip to content

Commit

Permalink
Explain checks
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderFabisch committed Nov 26, 2024
1 parent 0497f7a commit 457ce90
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pytransform3d/test/test_trajectories.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"):
Expand Down

0 comments on commit 457ce90

Please sign in to comment.