@@ -87,6 +87,15 @@ def _make_subsection(fmt, earned, possible, show_corr, *, due_delta_days=None, i
8787 ],
8888 {'avg' : 0.0 , 'weighted' : 0.0 , 'hidden' : 'all' , 'final' : 0.0 , 'last_grade_publish_date_days' : 7 },
8989 ),
90+ (
91+ 'string_typed_policy_counts' ,
92+ {'type' : 'Homework' , 'weight' : '1.0' , 'drop_count' : '1' , 'min_count' : '2' , 'short_label' : 'HW' },
93+ [
94+ _make_subsection ('Homework' , 1 , 1 , ShowCorrectness .ALWAYS ),
95+ _make_subsection ('Homework' , 0 , 1 , ShowCorrectness .ALWAYS ),
96+ ],
97+ {'avg' : 1.0 , 'weighted' : 1.0 , 'hidden' : 'none' , 'final' : 1.0 },
98+ ),
9099]
91100
92101
@@ -187,7 +196,7 @@ def test_aggregate_assignment_type_grade_summary_scenarios(self):
187196 assert row ['average_grade' ] == expected ['avg' ]
188197 assert row ['weighted_grade' ] == expected ['weighted' ]
189198 assert row ['has_hidden_contribution' ] == expected ['hidden' ]
190- assert row ['num_droppable' ] == policy ['drop_count' ]
199+ assert row ['num_droppable' ] == int ( policy ['drop_count' ])
191200 assert (row ['last_grade_publish_date' ] is not None ) == (
192201 'last_grade_publish_date_days' in expected
193202 )
0 commit comments