Skip to content

Commit

Permalink
get rid of the last vestiges of _assert_raises
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed Nov 24, 2023
1 parent cfc0755 commit 84fb527
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/trio/_tests/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from .._highlevel_generic import StapledStream, aclose_forcefully
from .._highlevel_socket import SocketListener
from ..testing import *
from ..testing._check_streams import _assert_raises
from ..testing._memory_streams import _UnboundedByteQueue

if TYPE_CHECKING:
Expand Down Expand Up @@ -239,19 +238,6 @@ async def child(i: int) -> None:
################################################################


async def test__assert_raises() -> None:
with pytest.raises(AssertionError):
with _assert_raises(RuntimeError):
1 + 1 # noqa: B018 # "useless expression"

with pytest.raises(TypeError):
with _assert_raises(RuntimeError):
"foo" + 1 # type: ignore[operator] # noqa: B018 # "useless expression"

with _assert_raises(RuntimeError):
raise RuntimeError


# This is a private implementation detail, but it's complex enough to be worth
# testing directly
async def test__UnboundeByteQueue() -> None:
Expand Down

0 comments on commit 84fb527

Please sign in to comment.