def test_mul(self, formatted, span_format): s = Span.parse(span_format) self.assertEquals(formatted, str(s))
def test_add(self, times, span_format): s = Span.parse(span_format) + 100 self.assertEquals(map(lambda t: t + 100, times), map(int, (s.stime, s.etime)))
def test_mul(self, times, span_format): s = Span.parse(span_format) * 4 self.assertEquals(map(lambda t: t * 4, times), map(int, (s.stime, s.etime)))
def test_parse(self, times, span_format): s = Span.parse(span_format) self.assertEquals(times, map(int, (s.stime, s.etime)))