diff --git a/tests/test_socket.py b/tests/test_socket.py index 58caa1c..813ba19 100644 --- a/tests/test_socket.py +++ b/tests/test_socket.py @@ -27,7 +27,7 @@ def test_socket(): """) result = testdir.runpytest("--verbose") result.assert_outcomes(1, 0, 0) - with pytest.raises(Exception): + with pytest.raises(BaseException): assert_socket_blocked(result) @@ -188,7 +188,7 @@ def test_disable_enable(): """) result = testdir.runpytest("--verbose") result.assert_outcomes(3, 0, 0) - with pytest.raises(Exception): + with pytest.raises(BaseException): assert_socket_blocked(result) @@ -200,7 +200,7 @@ def test_socket_enabled(socket_enabled): """) result = testdir.runpytest("--verbose") result.assert_outcomes(1, 0, 0) - with pytest.raises(Exception): + with pytest.raises(BaseException): assert_socket_blocked(result)