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 @@ -623,16 +623,20 @@ def test_blitting_events(env):
623
623
assert 0 < ndraws < 5
624
624
625
625
626
+ def _fallback_check ():
627
+ import IPython .core .interactiveshell as ipsh
628
+ import matplotlib .pyplot
629
+ ipsh .InteractiveShell .instance ()
630
+ matplotlib .pyplot .figure ()
631
+
632
+
626
633
def test_fallback_to_different_backend ():
634
+ pytest .importorskip ("IPython" )
627
635
import subprocess
628
636
# Runs the process that caused the GH issue 23770
629
637
# making sure that this doesn't crash
630
638
# since we're supposed to be switching to a different backend instead.
631
- response = subprocess .run (["python" , "-c" ,
632
- "import IPython.core.interactiveshell as ipsh; "
633
- "ipsh.InteractiveShell.instance(); "
634
- "import matplotlib.pyplot; "
635
- "matplotlib.pyplot.figure()" ], check = True )
639
+ response = _run_helper (_fallback_check , timeout = _test_timeout )
636
640
assert response != subprocess .CalledProcessError
637
641
638
642
You can’t perform that action at this time.
0 commit comments