예제 #1
0
    def test_should_remove_metrics_when_they_are_empty(self):
        metrics = {
            "empty": 0,
            "empty_long": 0L,
        }

        _reset_metrics(metrics)

        self.assertEquals(metrics,
                          {})
예제 #2
0
    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,
                           })