예제 #1
0
def test_reset_value_error(timeout):
    t = Timeout(1000)
    with pytest.raises(ValueError):
        t.reset(timeout)
예제 #2
0
def test_reset_and_set():
    t = Timeout(10000)
    assert not t.is_expired()
    t.reset(5000)
    assert t.is_expired()
예제 #3
0
def test_reset_type_error(timeout):
    t = Timeout(1000)
    with pytest.raises(TypeError):
        t.reset(timeout)