refactoring tests/torques_pendulum.py (so we can save all test trajectories)