I have a very simple test function that looks like this:
def test_timeout_connect():
with pytest.raises(minus_one_rpc.TimeoutExpired):
c = minus_one_rpc.Client("tcp://localhost:14247", recv_timeout = 100)
Without pytest.raises(...), I get a test FAILEDwith the expected exception. However, when I try to check for the correct exception, py.test hangs in this test.
No fixtures are involved in this particular test, but it looks like it has something to do with the break, because when I press Ctrl-C, the test reports like SUCCESS!
test_minus_one_rpc.py::test_timeout_connect ^CPASSED
What could be the reason?
source
share