From 7b7ea0f5f8ed5fde823fd3360b8a9cfebe558457 2021-11-07 02:34:44 From: Matthias Bussonnier Date: 2021-11-07 02:34:44 Subject: [PATCH] Merge pull request #13247 from Kojoley/tests-handle-no-matplotlib Skip test_pylabtools when no matplotlib installed --- diff --git a/IPython/core/tests/test_pylabtools.py b/IPython/core/tests/test_pylabtools.py index 64acd3d..579e647 100644 --- a/IPython/core/tests/test_pylabtools.py +++ b/IPython/core/tests/test_pylabtools.py @@ -8,14 +8,15 @@ from binascii import a2b_base64 from io import BytesIO -import matplotlib +import pytest + +matplotlib = pytest.importorskip("matplotlib") matplotlib.use('Agg') from matplotlib.figure import Figure from matplotlib import pyplot as plt from matplotlib_inline import backend_inline import numpy as np -import pytest from IPython.core.getipython import get_ipython from IPython.core.interactiveshell import InteractiveShell