Skip to content

Commit 84fb527

Browse files
committed
get rid of the last vestiges of _assert_raises
1 parent cfc0755 commit 84fb527

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/trio/_tests/test_testing.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from .._highlevel_generic import StapledStream, aclose_forcefully
1515
from .._highlevel_socket import SocketListener
1616
from ..testing import *
17-
from ..testing._check_streams import _assert_raises
1817
from ..testing._memory_streams import _UnboundedByteQueue
1918

2019
if TYPE_CHECKING:
@@ -239,19 +238,6 @@ async def child(i: int) -> None:
239238
################################################################
240239

241240

242-
async def test__assert_raises() -> None:
243-
with pytest.raises(AssertionError):
244-
with _assert_raises(RuntimeError):
245-
1 + 1 # noqa: B018 # "useless expression"
246-
247-
with pytest.raises(TypeError):
248-
with _assert_raises(RuntimeError):
249-
"foo" + 1 # type: ignore[operator] # noqa: B018 # "useless expression"
250-
251-
with _assert_raises(RuntimeError):
252-
raise RuntimeError
253-
254-
255241
# This is a private implementation detail, but it's complex enough to be worth
256242
# testing directly
257243
async def test__UnboundeByteQueue() -> None:

0 commit comments

Comments
 (0)