@@ -27,9 +27,16 @@ def test_tinypages(tmp_path):
27
27
# On CI, gcov emits warnings (due to agg headers being included with the
28
28
# same name in multiple extension modules -- but we don't care about their
29
29
# 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
33
40
out , err = proc .communicate ()
34
41
35
42
# 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):
166
173
extra_args = [] if extra_args is None else extra_args
167
174
cmd = [sys .executable , '-msphinx' , '-W' , '-b' , 'html' ,
168
175
'-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
171
184
out , err = proc .communicate ()
172
185
173
186
assert proc .returncode == 0 , \
0 commit comments