def test_reset_value_error(timeout): t = Timeout(1000) with pytest.raises(ValueError): t.reset(timeout)
def test_reset_and_set(): t = Timeout(10000) assert not t.is_expired() t.reset(5000) assert t.is_expired()
def test_reset_type_error(timeout): t = Timeout(1000) with pytest.raises(TypeError): t.reset(timeout)