def test_duration(self): for duration, expected in { 3.56: '3.56s', 13.6: '13s', 78.2: '1m18s', 60 * 62 + 3: '1h2m', }.iteritems(): self.assertEqual(expected, filters.do_duration(duration))
def test_duration(self): for duration, expected in {3.56: "3.56s", 13.6: "13s", 78.2: "1m18s", 60 * 62 + 3: "1h2m"}.iteritems(): self.assertEqual(expected, filters.do_duration(duration))