Exemplo n.º 1
0
def test_available_connections_too_much_acquires():
    ac = aioftp.AvailableConnections(3)
    ac.acquire()
    ac.acquire()
    ac.acquire()
    with pytest.raises(ValueError):
        ac.acquire()
Exemplo n.º 2
0
def test_available_connections_too_much_releases():
    ac = aioftp.AvailableConnections(3)
    ac.acquire()
    ac.release()
    ac.release()