Skip to content

Commit e025e7f

Browse files
committed
Increase subprocess test timeout for slow architectures
The default 60-second timeout in subprocess_run_for_testing is too short for riscv64, causing test_sphinxext and test_determinism_check to fail with TimeoutExpired. Increase the default by 6 for CI environments.
1 parent 7bef015 commit e025e7f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎lib/matplotlib/testing/__init__.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ def ipython_in_subprocess(requested_backend_or_gui_framework, all_expected_backe
236236
expected_backend = backend
237237
break
238238

239+
if is_ci_environment():
240+
timeout *= 6
239241
code = ("import matplotlib as mpl, matplotlib.pyplot as plt;"
240242
"fig, ax=plt.subplots(); ax.plot([1, 3, 2]); mpl.get_backend()")
241243
proc = subprocess_run_for_testing(
@@ -247,6 +249,7 @@ def ipython_in_subprocess(requested_backend_or_gui_framework, all_expected_backe
247249
],
248250
check=True,
249251
capture_output=True,
252+
timeout=timeout,
250253
)
251254

252255
assert proc.stdout.strip().endswith(f"'{expected_backend}'")

0 commit comments

Comments
 (0)