示例#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)