Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ipython --pylab
1 parent 27969d6 commit 196cbf2Copy full SHA for 196cbf2
lib/matplotlib/tests/test_pyplot.py
@@ -1,5 +1,6 @@
1
import difflib
2
import numpy as np
3
+import os
4
import subprocess
5
import sys
6
from pathlib import Path
@@ -367,3 +368,23 @@ def test_set_current_axes_on_subfigure():
367
368
assert plt.gca() != ax
369
plt.sca(ax)
370
assert plt.gca() == ax
371
+
372
373
+def test_pylab_intergation():
374
+ pytest.importorskip("IPython")
375
+ subprocess.run(
376
+ [
377
+ sys.executable,
378
+ "-m",
379
+ "IPython",
380
+ "--pylab",
381
+ "-c",
382
+ "import matplotlib.pyplot as plt; assert plt._REPL_DISPLAYHOOK == plt._ReplDisplayHook.IPYTHON", # noqa
383
+ ],
384
+ env={**os.environ, "SOURCE_DATE_EPOCH": "0"},
385
+ timeout=5,
386
+ check=True,
387
+ stdout=subprocess.PIPE,
388
+ stderr=subprocess.PIPE,
389
+ universal_newlines=True,
390
+ )
0 commit comments