Made some assertions more verbose for easier debugging

This commit is contained in:
2023-06-10 18:49:02 +02:00
parent 40d2409c26
commit f07b8a26ac
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -124,12 +124,12 @@ def test_length(mp_type: str, env_wrap: Tuple[str, Type[RawInterfaceWrapper]]):
{'phase_generator_type': 'exp'},
{'basis_generator_type': basis_generator_type})
for _ in range(5):
for i in range(5):
env.reset()
_obs, _reward, _terminated, _truncated, info = env.step(env.action_space.sample())
length = info['trajectory_length']
assert length == env.spec.max_episode_steps
assert length == env.spec.max_episode_steps, f'Expcted total simulation length ({length}) to be equal to spec.max_episode_steps ({env.spec.max_episode_steps}), but was not during test nr. {i}'
@pytest.mark.parametrize('mp_type', ['promp', 'dmp', 'prodmp'])