def test_should_remove_metrics_when_they_are_empty(self): metrics = { "empty": 0, "empty_long": 0L, } _reset_metrics(metrics) self.assertEquals(metrics, {})
def test_should_just_reset_metrics_when_they_are_not_empty(self): metrics = { "full": 42, "full_long": 42L, } _reset_metrics(metrics) self.assertEquals(metrics, {"full": 0, "full_long": 0, })