def test_elapsed_input_int(): t = Timeout(10000) assert t.elapsed() == 5000 assert t.elapsed() == 10000
def test_elapsed_input_datetime(): t = Timeout(datetime.datetime(2000, 1, 15, 0, 0, 10)) assert t.elapsed() == 5000 assert t.elapsed() == 10000
def test_elapsed_type(timeout): t = Timeout(timeout) assert isinstance(t.elapsed(), int)