File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -536,16 +536,20 @@ def test_blitting_events(env):
536
536
assert 0 < ndraws < 5
537
537
538
538
539
+ def _fallback_check ():
540
+ import IPython .core .interactiveshell as ipsh
541
+ import matplotlib .pyplot
542
+ ipsh .InteractiveShell .instance ()
543
+ matplotlib .pyplot .figure ()
544
+
545
+
539
546
def test_fallback_to_different_backend ():
547
+ pytest .importorskip ("IPython" )
540
548
import subprocess
541
549
# Runs the process that caused the GH issue 23770
542
550
# making sure that this doesn't crash
543
551
# since we're supposed to be switching to a different backend instead.
544
- response = subprocess .run (["python" , "-c" ,
545
- "import IPython.core.interactiveshell as ipsh; "
546
- "ipsh.InteractiveShell.instance(); "
547
- "import matplotlib.pyplot; "
548
- "matplotlib.pyplot.figure()" ], check = True )
552
+ response = _run_helper (_fallback_check , timeout = _test_timeout )
549
553
assert response != subprocess .CalledProcessError
550
554
551
555
You can’t perform that action at this time.
0 commit comments