@@ -29,13 +29,16 @@ def ctx():
2929
3030@pytest .fixture ()
3131async def iopub_thread (ctx ):
32- async with zmq_anyio .Socket (ctx .socket (zmq .PUB )) as pub :
33- thread = IOPubThread (pub )
34- thread .start ()
32+ try :
33+ async with zmq_anyio .Socket (ctx .socket (zmq .PUB )) as pub :
34+ thread = IOPubThread (pub )
35+ thread .start ()
3536
36- yield thread
37- thread .stop ()
38- thread .close ()
37+ yield thread
38+ thread .stop ()
39+ thread .close ()
40+ except Exception :
41+ pass
3942
4043
4144async def test_io_api (iopub_thread ):
@@ -67,7 +70,7 @@ async def test_io_isatty(iopub_thread):
6770 assert stream .isatty ()
6871
6972
70- async def test_io_thread (anyio_backend , iopub_thread ):
73+ async def test_io_thread (iopub_thread ):
7174 thread = iopub_thread
7275 thread ._setup_pipe_in ()
7376 msg = [thread ._pipe_uuid , b"a" ]
@@ -81,7 +84,7 @@ async def test_io_thread(anyio_backend, iopub_thread):
8184 thread .stop ()
8285
8386
84- async def test_background_socket (anyio_backend , iopub_thread ):
87+ async def test_background_socket (iopub_thread ):
8588 sock = BackgroundSocket (iopub_thread )
8689 assert sock .__class__ == BackgroundSocket
8790 with warnings .catch_warnings ():
@@ -92,7 +95,7 @@ async def test_background_socket(anyio_backend, iopub_thread):
9295 sock .send (b"hi" )
9396
9497
95- async def test_outstream (anyio_backend , iopub_thread ):
98+ async def test_outstream (iopub_thread ):
9699 session = Session ()
97100 pub = iopub_thread .socket
98101
@@ -118,7 +121,6 @@ async def test_outstream(anyio_backend, iopub_thread):
118121 assert stream .writable ()
119122
120123
121- @pytest .mark .anyio ()
122124async def test_event_pipe_gc (iopub_thread ):
123125 session = Session (key = b"abc" )
124126 stream = OutStream (
@@ -193,7 +195,6 @@ async def subprocess_test_echo_watch():
193195 iopub_thread .close ()
194196
195197
196- @pytest .mark .anyio ()
197198@pytest .mark .skipif (sys .platform .startswith ("win" ), reason = "Windows" )
198199async def test_echo_watch (ctx ):
199200 """Test echo on underlying FD while capturing the same FD
0 commit comments