@@ -88,14 +88,23 @@ def _make_subsection(fmt, earned, possible, show_corr, *, due_delta_days=None, i
8888 {'avg' : 0.0 , 'weighted' : 0.0 , 'hidden' : 'all' , 'final' : 0.0 , 'last_grade_publish_date_days' : 7 },
8989 ),
9090 (
91- 'string_typed_policy_counts ' ,
91+ 'string_int_typed_policy_counts ' ,
9292 {'type' : 'Homework' , 'weight' : '1.0' , 'drop_count' : '1' , 'min_count' : '2' , 'short_label' : 'HW' },
9393 [
9494 _make_subsection ('Homework' , 1 , 1 , ShowCorrectness .ALWAYS ),
9595 _make_subsection ('Homework' , 0 , 1 , ShowCorrectness .ALWAYS ),
9696 ],
9797 {'avg' : 1.0 , 'weighted' : 1.0 , 'hidden' : 'none' , 'final' : 1.0 },
9898 ),
99+ (
100+ 'string_float_typed_policy_counts' ,
101+ {'type' : 'Homework' , 'weight' : '1.0' , 'drop_count' : '1.0' , 'min_count' : '2.0' , 'short_label' : 'HW' },
102+ [
103+ _make_subsection ('Homework' , 1 , 1 , ShowCorrectness .ALWAYS ),
104+ _make_subsection ('Homework' , 0 , 1 , ShowCorrectness .ALWAYS ),
105+ ],
106+ {'avg' : 1.0 , 'weighted' : 1.0 , 'hidden' : 'none' , 'final' : 1.0 },
107+ ),
99108]
100109
101110
@@ -196,7 +205,7 @@ def test_aggregate_assignment_type_grade_summary_scenarios(self):
196205 assert row ['average_grade' ] == expected ['avg' ]
197206 assert row ['weighted_grade' ] == expected ['weighted' ]
198207 assert row ['has_hidden_contribution' ] == expected ['hidden' ]
199- assert row ['num_droppable' ] == int (policy ['drop_count' ])
208+ assert row ['num_droppable' ] == int (float ( policy ['drop_count' ]) )
200209 assert (row ['last_grade_publish_date' ] is not None ) == (
201210 'last_grade_publish_date_days' in expected
202211 )
0 commit comments