@@ -27,9 +27,16 @@ def test_tinypages(tmp_path):
2727 # On CI, gcov emits warnings (due to agg headers being included with the
2828 # same name in multiple extension modules -- but we don't care about their
2929 # coverage anyways); hide them using GCOV_ERROR_FILE.
30- proc = Popen (
31- cmd , stdout = PIPE , stderr = PIPE , universal_newlines = True ,
32- env = {** os .environ , "MPLBACKEND" : "" , "GCOV_ERROR_FILE" : os .devnull })
30+ try :
31+ proc = Popen (
32+ cmd , stdout = PIPE , stderr = PIPE , universal_newlines = True ,
33+ env = {** os .environ , "MPLBACKEND" : "" , "GCOV_ERROR_FILE" : os .devnull }
34+ )
35+ except BlockingIOError :
36+ if sys .platform == "cygwin" :
37+ pytest .xfail ("Fork failure" )
38+ else :
39+ raise
3340 out , err = proc .communicate ()
3441
3542 # Build the pages with warnings turned into errors
@@ -166,8 +173,14 @@ def build_sphinx_html(tmp_path, doctree_dir, html_dir, extra_args=None):
166173 extra_args = [] if extra_args is None else extra_args
167174 cmd = [sys .executable , '-msphinx' , '-W' , '-b' , 'html' ,
168175 '-d' , str (doctree_dir ), str (tmp_path ), str (html_dir ), * extra_args ]
169- proc = Popen (cmd , stdout = PIPE , stderr = PIPE , universal_newlines = True ,
170- env = {** os .environ , "MPLBACKEND" : "" })
176+ try :
177+ proc = Popen (cmd , stdout = PIPE , stderr = PIPE , universal_newlines = True ,
178+ env = {** os .environ , "MPLBACKEND" : "" })
179+ except BlockingIOError :
180+ if sys .platform == "cygwin" :
181+ pytest .xfail ("Fork failure" )
182+ else :
183+ raise
171184 out , err = proc .communicate ()
172185
173186 assert proc .returncode == 0 , \
0 commit comments