8000 TST: Remove numpy cpu disabling from some subprocess tests · matplotlib/matplotlib@d6f6875 · GitHub
[go: up one dir, main page]

Skip to content

Commit d6f6875

Browse files
committed
TST: Remove numpy cpu disabling from some subprocess tests
This removes the NPY_DISABLE_CPU_FEATURES flag from the sphinx and tk 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 d6f6875

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/matplotlib/tests/test_backend_tk.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ def test_func():
3636
try:
3737
proc = subprocess.run(
3838
[sys.executable, "-c", f"{source}\n{func.__name__}()"],
39-
env={**os.environ, "MPLBACKEND": "TkAgg"},
39+
env={**os.environ, "MPLBACKEND": "TkAgg",
40+
"NPY_DISABLE_CPU_FEATURES": ""},
4041
timeout=_test_timeout,
4142
stdout=subprocess.PIPE,
4243
stderr=subprocess.PIPE,

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={< 5512 span class=pl-c1>**os.environ, "MPLBACKEND": "",
133+
"NPY_DISABLE_CPU_FEATURES": ""})
132134
out, err = proc.communicate()
133135

134136
assert proc.returncode == 0, \

0 commit comments

Comments
 (0)
0