def test_remaining_input_int(): t = Timeout(10000) assert t.remaining() == 5000 assert t.remaining() == 0
def test_remaining_input_datetime(): t = Timeout(datetime.datetime(2000, 1, 15, 0, 0, 10)) assert t.remaining() == 5000 assert t.remaining() == 0
def test_remaining_type(timeout): t = Timeout(timeout) assert isinstance(t.remaining(), int)