8000 Merge pull request #23106 from anntzer/tpi · tacaswell/matplotlib@829b699 · GitHub
[go: up one dir, main page]

Skip to content

Commit 829b699

Browse files
committed
Merge pull request matplotlib#23106 from anntzer/tpi
MNT: Reuse subprocess_run_helper in test_pylab_integration. (cherry picked from commit 51624b6)
1 parent d2da83f commit 829b699

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

lib/matplotlib/tests/test_pyplot.py

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import difflib
22
import numpy as np
3-
import os
43
import subprocess
54
import sys
65
from pathlib import Path
@@ -339,23 +338,14 @@ def test_fallback_position():
339338

340339

341340
def test_pylab_integration():
342-
pytest.importorskip("IPython")
343-
subprocess.run(
344-
[
345-
sys.executable,
346-
"-m",
347-
"IPython",
348-
"--pylab",
349-
"-c",
350-
";".join((
351-
"import matplotlib.pyplot as plt",
352-
"assert plt._REPL_DISPLAYHOOK == plt._ReplDisplayHook.IPYTHON",
353-
)),
354-
],
355-
env={**os.environ, "SOURCE_DATE_EPOCH": "0"},
341+
IPython = pytest.importorskip("IPython")
342+
mpl.testing.subprocess_run_helper(
343+
IPython.start_ipython,
344+
"--pylab",
345+
"-c",
346+
";".join((
347+
"import matplotlib.pyplot as plt",
348+
"assert plt._REPL_DISPLAYHOOK == plt._ReplDisplayHook.IPYTHON",
349+
)),
356350
timeout=60,
357-
check=True,
358-
stdout=subprocess.PIPE,
359-
stderr=subprocess.PIPE,
360-
universal_newlines=True,
361351
)

0 commit comments

Comments
 (0)
0