Skip to content

Commit 725f1b9

Browse files
Consistent environments for subprocesses
H/T @QuLogic
1 parent 96caee2 commit 725f1b9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/matplotlib/tests/test_backend_tk.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ def legitimate_quit():
6262
try:
6363
proc = subprocess.run(
6464
[sys.executable, "-c", script,],
65-
env={**os.environ, "SOURCE_DATE_EPOCH": "0"},
65+
env={**os.environ,
66+
"MPLBACKEND": "TkAgg",
67+
"SOURCE_DATE_EPOCH": "0"},
6668
timeout=_test_timeout,
6769
stdout=subprocess.PIPE,
6870
check=True,
@@ -149,7 +151,9 @@ def test_never_update():
149151
try:
150152
proc = subprocess.run(
151153
[sys.executable, "-c", script,],
152-
env={**os.environ, "SOURCE_DATE_EPOCH": "0"},
154+
env={**os.environ,
155+
"MPLBACKEND": "TkAgg",
156+
"SOURCE_DATE_EPOCH": "0"},
153157
timeout=_test_timeout,
154158
capture_output=True,
155159
universal_newlines=True,

0 commit comments

Comments
 (0)