Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a2eed8e

Browse files
committed
TST: Remove numpy cpu disabling from sphinx tests
This removes the NPY_DISABLE_CPU_FEATURES flag from the sphinx tests as they emit warnings on CI which leads to failure from the subprocess. These don't need to be disabled on these tests, so remove them from the environment variables that are passed in.
1 parent 24d9f37 commit a2eed8e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/tests/test_sphinxext.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def test_tinypages(tmpdir):
2828
# coverage anyways); hide them using GCOV_ERROR_FILE.
2929
proc = Popen(
3030
cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True,
31-
env={**os.environ, "MPLBACKEND": "", "GCOV_ERROR_FILE": os.devnull})
31+
env={**os.environ, "MPLBACKEND": "", "GCOV_ERROR_FILE": os.devnull,
32+
"NPY_DISABLE_CPU_FEATURES": ""})
3233
out, err = proc.communicate()
3334

3435
# Build the pages with warnings turned into errors
@@ -128,7 +129,8 @@ def build_sphinx_html(source_dir, doctree_dir, html_dir, extra_args=None):
128129
cmd = [sys.executable, '-msphinx', '-W', '-b', 'html',
129130
'-d', str(doctree_dir), str(source_dir), str(html_dir), *extra_args]
130131
proc = Popen(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True,
131-
env={**os.environ, "MPLBACKEND": ""})
132+
env={**os.environ, "MPLBACKEND": "",
133+
"NPY_DISABLE_CPU_FEATURES": ""})
132134
out, err = proc.communicate()
133135

134136
assert proc.returncode == 0, \

0 commit comments

Comments
 (0)