File tree Expand file tree Collapse file tree 1 file changed +9
-19
lines changed Expand file tree Collapse file tree 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
@@ -339,23 +338,14 @@ def test_fallback_position():
339
338
340
339
341
340
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
+ )),
356
350
timeout = 60 ,
357
- check = True ,
358
- stdout = subprocess .PIPE ,
359
- stderr = subprocess .PIPE ,
360
- universal_newlines = True ,
361
351
)
You can’t perform that action at this time.
0 commit comments