Skip to content

Commit

Permalink
Revert "Make tests less strict with tolerance"
Browse files Browse the repository at this point in the history
This reverts commit 3b3e1b8.
  • Loading branch information
alocate committed Feb 10, 2021
1 parent 3b3e1b8 commit 9f58978
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ def run_test(mmr0, rd0, winning_team, number_of_teams, mmr1, rd1):
},
)
assert response.status_code == 200

result = response.json()

ratings_list = result["ratings_list"]
rds_list = result["rds_list"]
number_of_players = len(ratings_list)

diff_mmr = [np.abs(ratings_list[i] - mmr1[i]) for i in range(number_of_players)]
diff_rd = [np.abs(rds_list[i] - rd1[i]) for i in range(number_of_players)]
rl = [np.round(num) for num in ratings_list]
rd = [np.round(num) for num in rds_list]

assert np.max(diff_mmr) < 1
assert np.max(diff_rd) < 1
assert rl == mmr1
assert rd == rd1


def test_2x2():
Expand Down

0 comments on commit 9f58978

Please sign in to comment.