Skip to content

Commit e7491d7

Browse files
authored
Merge pull request #725 from Axelrod-Python/fixequ
Fix floating point error in a hyp test
2 parents e21ac85 + 4a0bf57 commit e7491d7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

axelrod/tests/unit/test_resultset.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,11 +500,15 @@ def test_equality_with_round_robin(self, tournament):
500500
progress_bar=False)
501501

502502
# Not testing full equality because of floating point errors.
503-
self.assertEqual(rs.ranked_names, brs.ranked_names)
504503
self.assertEqual(rs.scores, brs.scores)
504+
self.assertEqual(rs.wins, brs.wins)
505505
self.assertEqual(rs.match_lengths, brs.match_lengths)
506506
self.assertEqual(rs.cooperation, brs.cooperation)
507507

508+
# Test that players are in the results (due to floating point errors
509+
# the order might not be the same)
510+
self.assertEqual(set(rs.ranked_names), set(brs.ranked_names))
511+
508512
@given(tournament=prob_end_tournaments(max_size=5,
509513
min_prob_end=.7,
510514
max_repetitions=3))

0 commit comments

Comments
 (0)