File tree 1 file changed +9
-19
lines changed
1 file changed +9
-19
lines changed Original file line number Diff line number Diff line change 1
1
import difflib
2
2
import numpy as np
3
- import os
4
3
import subprocess
5
4
import sys
6
5
from pathlib import Path
@@ -371,23 +370,14 @@ def test_set_current_axes_on_subfigure():
371
370
372
371
373
372
def test_pylab_integration ():
374
- pytest .importorskip ("IPython" )
375
- subprocess .run (
376
- [
377
- sys .executable ,
378
- "-m" ,
379
- "IPython" ,
380
- "--pylab" ,
381
- "-c" ,
382
- ";" .join ((
383
- "import matplotlib.pyplot as plt" ,
384
- "assert plt._REPL_DISPLAYHOOK == plt._ReplDisplayHook.IPYTHON" ,
385
- )),
386
- ],
387
- env = {** os .environ , "SOURCE_DATE_EPOCH" : "0" },
373
+ IPython = pytest .importorskip ("IPython" )
374
+ mpl .testing .subprocess_run_helper (
375
+ IPython .start_ipython ,
376
+ "--pylab" ,
377
+ "-c" ,
378
+ ";" .join ((
379
+ "import matplotlib.pyplot as plt" ,
380
+ "assert plt._REPL_DISPLAYHOOK == plt._ReplDisplayHook.IPYTHON" ,
381
+ )),
388
382
timeout = 60 ,
389
- check = True ,
390
- stdout = subprocess .PIPE ,
391
- stderr = subprocess .PIPE ,
392
- universal_newlines = True ,
393
383
)
You can’t perform that action at this time.
0 commit comments