File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,8 @@ def test_stdout(self):
9999 out , err = assemble_output (kc .iopub_channel )
100100 assert out == 'bar\n '
101101
102- @pytest .mark .skipif (
103- sys .platform == 'win32' ,
104- reason = "not ment to work on windows"
102+ @pytest .mark .skip (
103+ reason = "Currently don't capture during test as pytest does its own capturing"
105104 )
106105 def test_capfd (self ):
107106 """ Does correctly capture fd
Original file line number Diff line number Diff line change 1414from weakref import WeakSet
1515import traceback
1616from io import StringIO , TextIOBase
17+ import os
1718
1819import zmq
1920if zmq .pyzmq_version_info () >= (17 , 0 ):
@@ -364,9 +365,13 @@ def __init__(
364365 self ._new_buffer ()
365366 self .echo = None
366367
367- if watchfd and (
368- sys .platform .startswith ("linux" ) or sys .platform .startswith ("darwin" )
368+ if (
369+ watchfd
370+ and (sys .platform .startswith ("linux" ) or sys .platform .startswith ("darwin" ))
371+ and ("PYTEST_CURRENT_TEST" not in os .environ )
369372 ):
373+ # Pytest set its own capture. Dont redirect from within pytest.
374+
370375 self ._should_watch = True
371376 self ._setup_stream_redirects (name )
372377
Original file line number Diff line number Diff line change @@ -51,7 +51,10 @@ def test_simple_print():
5151 assert stderr == ''
5252 _check_master (kc , expected = True )
5353
54- @pytest .mark .skipif (sys .platform == 'win32' , reason = 'Not meant to work on windows' )
54+
55+ @pytest .mark .skip (
56+ reason = "Currently don't capture during test as pytest does its own capturing"
57+ )
5558def test_capture_fd ():
5659 """simple print statement in kernel"""
5760 with kernel () as kc :
You can’t perform that action at this time.
0 commit comments