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 the pytest.raises(...)
, I am getting a FAILED
test with the expected exception. However, when I try to test for the correct exception, py.test hangs at that test.
No fixtures are involved in this particular test, but it seems to have something to do with a teardown, since when I press Ctrl-C, the test is reported as SUCCESS
!
test_minus_one_rpc.py::test_timeout_connect ^CPASSED
================================================== 27 tests deselected ==================================================
======================================== 1 passed, 27 deselected in 3.02 seconds ========================================
What could be the reason?