Skip to content

Commit e52c8ea

Browse files
committed
Add test for TrapezoidProfile.State repr
1 parent 91a2ad5 commit e52c8ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

subprojects/robotpy-wpimath/tests/test_trapezoid_profile.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,11 @@ def test_constraints_repr(TrapezoidProfile):
1414
constraints = TrapezoidProfile.Constraints()
1515

1616
assert repr(constraints).startswith(f"{expected_qualname}(maxVelocity=0.")
17+
18+
19+
@pytest.mark.parametrize("TrapezoidProfile", trapezoid_profile_types)
20+
def test_state_repr(TrapezoidProfile):
21+
expected_qualname = f"{TrapezoidProfile.__name__}.State"
22+
constraints = TrapezoidProfile.State()
23+
24+
assert repr(constraints).startswith(f"{expected_qualname}(position=0.")

0 commit comments

Comments
 (0)