def test_simple_addition(): a = Time('05:25:45') b = Time('12:24:21') c = a + b assert c == Time('17:51:06')
def test_forward_multiply(): a = Time('05:25:45') b = a * 2 assert b == Time('10:51:30')
def test_backward_multiply(): a = Time('05:25:45') b = 2 * a assert b == Time('10:51:30')
def test_modulo_addition(): a = Time('05:25:45') b = Time('20:24:21') assert c == Time('01:51:06')
def test_wrong_format_input(): #todo t = Time('12h25m36s') pass
def test_nominal_init(): t = Time('12:25:36') assert t.hour == 12 assert t.minute == 25 assert t.second == 36
def test_unphysical_input(): #todo t = Time('65:25:36') t = Time('12:61:36') t = Time('12:25:61') pass
def test_repr(): a = Time('02:06:46') assert a.__repr__() == '02h 06m 46s'