Skip to content

Commit 65dcc0e

Browse files
committed
Ensure full environment is passed to headless test.
Otherwise, e.g., `PYTHONPATH` is not available.
1 parent 6d394df commit 65dcc0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def test_lazy_linux_headless():
301301
302302
"""
303303
proc = subprocess.run([sys.executable, "-c", test_script],
304-
env={"MPLBACKEND": ""})
304+
env={**os.environ, "MPLBACKEND": ""})
305305
if proc.returncode:
306306
pytest.fail("The subprocess returned with non-zero exit status "
307307
f"{proc.returncode}.")

0 commit comments

Comments
 (0)