Skip to content

Commit

Permalink
Change the inherited exception class in tests
Browse files Browse the repository at this point in the history
As of pytest 3.2.0, the internal outcome class no longer inherits from
Exception, rather from BaseException.

This was reported in pytest-dev/pytest#580 and changed in pytest-dev/pytest#2490

Signed-off-by: Mike Fiedler <[email protected]>
  • Loading branch information
miketheman committed Sep 6, 2017
1 parent 410ce58 commit dc11ae7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down Expand Up @@ -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)


Expand All @@ -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)


Expand Down

0 comments on commit dc11ae7

Please sign in to comment.