Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b7ea0f

Browse files
authored
Merge pull request #13247 from Kojoley/tests-handle-no-matplotlib
Skip test_pylabtools when no matplotlib installed
2 parents f9db68b + 2f9407e commit 7b7ea0f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

IPython/core/tests/test_pylabtools.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
from binascii import a2b_base64
99
from io import BytesIO
1010

11-
import matplotlib
11+
import pytest
12+
13+
matplotlib = pytest.importorskip("matplotlib")
1214
matplotlib.use('Agg')
1315
from matplotlib.figure import Figure
1416

1517
from matplotlib import pyplot as plt
1618
from matplotlib_inline import backend_inline
1719
import numpy as np
18-
import pytest
1920

2021
from IPython.core.getipython import get_ipython
2122
from IPython.core.interactiveshell import InteractiveShell

0 commit comments

Comments
 (0)