Skip to content

Commit

Permalink
Grade Tests Fixed for Percent Correct
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-morris committed Jul 8, 2024
1 parent 8ccfc1b commit 82ca34e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/test_grade/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def test_single_notebook_grade(mocked_launch_grade):
"q6": 5.0,
"q2b": 2.0,
"q7": 1.0,
"percent_correct": 1.0,
"percent_correct": float('nan'),
"total_points_earned": 15.0,
"file": POINTS_POSSIBLE_LABEL,
},{
Expand Down Expand Up @@ -243,7 +243,7 @@ def test_config_overrides(mocked_launch_grade):
"q6": 5.0,
"q2b": 2.0,
"q7": 1.0,
"percent_correct": 1.0,
"percent_correct": float('nan'),
"total_points_earned": 15.0,
"file": POINTS_POSSIBLE_LABEL,
},{
Expand Down Expand Up @@ -309,7 +309,7 @@ def test_config_overrides_integration():
"q6": 5.0,
"q2b": 2.0,
"q7": 1.0,
"percent_correct": "--",
"percent_correct": float('nan'),
"total_points_earned": 13.0,
"file": POINTS_POSSIBLE_LABEL,
},{
Expand All @@ -320,13 +320,13 @@ def test_config_overrides_integration():
"q6": 5.0,
"q2b": 2.0,
"q7": 1.0,
"percent_correct": "1.0",
"percent_correct": 1.0,
"total_points_earned": 13.0,
"file": os.path.splitext(os.path.basename(ZIP_SUBM_PATH))[0],
}])

# Sort the columns by label so the dataframes can be compared with ==.
got = got.reindex(sorted(got.columns), axis=1)
want = want.reindex(sorted(want.columns), axis=1)

print(got.compare(want))
assert got.equals(want)

0 comments on commit 82ca34e

Please sign in to comment.