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