Skip to content

Commit

Permalink
Fix flaky comparison in test_trajectory.py (MichaelGrupp#293)
Browse files Browse the repository at this point in the history
Use assertAlmostEqual like in the other float comparisons.
  • Loading branch information
MichaelGrupp committed Jun 22, 2020
1 parent 7d29143 commit 2c22080
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_reduce_to_ids(self):
len_initial_segment = np.linalg.norm(path.positions_xyz[2] -
path.positions_xyz[0])
len_reduced = path_reduced.path_length
self.assertEqual(len_initial_segment, len_reduced)
self.assertAlmostEqual(len_initial_segment, len_reduced)

def test_transform(self):
path = helpers.fake_path(10)
Expand Down

0 comments on commit 2c22080

Please sign in to comment.