Skip to content

Commit

Permalink
work around test ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbusche committed Nov 3, 2024
1 parent fae4ee1 commit bb06c5b
Showing 1 changed file with 11 additions and 20 deletions.
31 changes: 11 additions & 20 deletions tests/test_things.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,19 @@ def test_four_wr():
with open('four_wr.csv', 'r') as f:
four_wr = [f.readline().strip() for _ in range(10)]

# because of the duplicate scores, the results are not always returned in the same order
conditions = [
len(four_wr) == 10,
four_wr[
0] == "1,DST,Cardinals,2600,7.1,QB,Dak Prescott,6300,19.5,RB,Alvin and the Chipmunks,7800,22.9,RB,Matt Busche,7800,22.9,TE,Mike Gesicki,3100,10.6,WR,Cedric Tillman,4300,11.5,WR,Chris Olave,6100,17.0,WR,Drake London,6700,20.0,WR,Jakobi Meyers,5300,14.0,50000,145.5",
four_wr[
1] == "2,DST,Titans,3200,8.7,QB,Dak Prescott,6300,19.5,RB,Alvin and the Chipmunks,7800,22.9,RB,Kyren Williams,7000,21.1,TE,Mike Gesicki,3100,10.6,WR,Cedric Tillman,4300,11.5,WR,Chris Olave,6100,17.0,WR,Drake London,6700,20.0,WR,Jakobi Meyers,5300,14.0,49800,145.3",
four_wr[
2] == "3,DST,Titans,3200,8.7,QB,Jameis Winston,5400,17.4,RB,Chase from Paw Patrol,5900,17.9,RB,Kyren Williams,7000,21.1,TE,Mike Gesicki,3100,10.6,WR,Chris Olave,6100,17.0,WR,Drake London,6700,20.0,WR,Jakobi Meyers,5300,14.0,WR,Tyreek Hill,7300,18.6,50000,145.3",
four_wr[
3] == "4,DST,Cardinals,2600,7.1,QB,Lamar Jackson,8000,24.3,RB,Alvin and the Chipmunks,7800,22.9,RB,Chase from Paw Patrol,5900,17.9,TE,Mike Gesicki,3100,10.6,WR,Cedric Tillman,4300,11.5,WR,Chris Olave,6100,17.0,WR,Drake London,6700,20.0,WR,Jakobi Meyers,5300,14.0,49800,145.3",
four_wr[
4] == "5,DST,Cardinals,2600,7.1,QB,Lamar Jackson,8000,24.3,RB,Chase from Paw Patrol,5900,17.9,RB,Matt Busche,7800,22.9,TE,Mike Gesicki,3100,10.6,WR,Cedric Tillman,4300,11.5,WR,Chris Olave,6100,17.0,WR,Drake London,6700,20.0,WR,Jakobi Meyers,5300,14.0,49800,145.3",
four_wr[
5] == "6,DST,Titans,3200,8.7,QB,Dak Prescott,6300,19.5,RB,Kyren Williams,7000,21.1,RB,Matt Busche,7800,22.9,TE,Mike Gesicki,3100,10.6,WR,Cedric Tillman,4300,11.5,WR,Chris Olave,6100,17.0,WR,Drake London,6700,20.0,WR,Jakobi Meyers,5300,14.0,49800,145.3",
four_wr[
6] == "7,DST,Giants,2300,6.1,QB,Jameis Winston,5400,17.4,RB,Alvin and the Chipmunks,7800,22.9,RB,Kyren Williams,7000,21.1,TE,Mike Gesicki,3100,10.6,WR,Cedric Tillman,4300,11.5,WR,Chris Olave,6100,17.0,WR,Drake London,6700,20.0,WR,Tyreek Hill,7300,18.6,50000,145.2",
four_wr[
7] == "8,DST,Titans,3200,8.7,QB,Lamar Jackson,8000,24.3,RB,Alvin and the Chipmunks,7800,22.9,RB,Austin Powers,5300,16.2,TE,Mike Gesicki,3100,10.6,WR,Cedric Tillman,4300,11.5,WR,Chris Olave,6100,17.0,WR,Drake London,6700,20.0,WR,Jakobi Meyers,5300,14.0,49800,145.2",
four_wr[
8] == "9,DST,Titans,3200,8.7,QB,Lamar Jackson,8000,24.3,RB,Austin Powers,5300,16.2,RB,Matt Busche,7800,22.9,TE,Mike Gesicki,3100,10.6,WR,Cedric Tillman,4300,11.5,WR,Chris Olave,6100,17.0,WR,Drake London,6700,20.0,WR,Jakobi Meyers,5300,14.0,49800,145.2",
four_wr[
9] == "10,DST,Giants,2300,6.1,QB,Jameis Winston,5400,17.4,RB,Kyren Williams,7000,21.1,RB,Matt Busche,7800,22.9,TE,Mike Gesicki,3100,10.6,WR,Cedric Tillman,4300,11.5,WR,Chris Olave,6100,17.0,WR,Drake London,6700,20.0,WR,Tyreek Hill,7300,18.6,50000,145.2",
four_wr[0][-5:] == "145.5",
four_wr[1][-5:] == "145.3",
four_wr[2][-5:] == "145.3",
four_wr[3][-5:] == "145.3",
four_wr[4][-5:] == "145.3",
four_wr[5][-5:] == "145.3",
four_wr[6][-5:] == "145.2",
four_wr[7][-5:] == "145.2",
four_wr[8][-5:] == "145.2",
four_wr[9][-5:] == "145.2",
]

assert all(conditions)
Expand Down

0 comments on commit bb06c5b

Please sign in to comment.