8000 Use skip instead of SkipTest for joint nose/pytest support · matplotlib/matplotlib@3cdf590 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3cdf590

Browse files
committed
Use skip instead of SkipTest for joint nose/pytest support
1 parent 1414c28 commit 3cdf590

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

lib/matplotlib/tests/test_animation.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import numpy as np
1010
from numpy.testing import assert_equal
1111
from nose.tools import assert_false, assert_true
12-
from nose.plugins.skip import SkipTest
1312
import matplotlib as mpl
1413
from matplotlib import pyplot as plt
1514
from matplotlib import animation
@@ -200,7 +199,7 @@ def check_save_animation_pathlib(writer, extension='mp4'):
200199
try:
201200
from pathlib import Path
202201
except ImportError:
203-
raise SkipTest("pathlib not installed")
202+
skip("pathlib not installed")
204203

205204
if not animation.writers.is_available(writer):
206205
skip("writer '%s' not available on this system" % writer)

lib/matplotlib/tests/test_backend_pdf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from matplotlib import pyplot as plt
1515
from matplotlib.testing.decorators import (image_comparison, knownfailureif,
1616
cleanup)
17-
from nose.plugins.skip import SkipTest
17+
from matplotlib.testing import skip
1818

1919
if 'TRAVIS' not in os.environ:
2020
@image_comparison(baseline_images=['pdf_use14corefonts'],
@@ -158,7 +158,7 @@ def test_savefig_accept_pathlib():
158158
try:
159159
from pathlib import Path
160160
except ImportError:
161-
raise SkipTest("pathlib not installed")
161+
skip("pathlib not installed")
162162
from tempfile import NamedTemporaryFile
163163

164164
fig, ax = plt.subplots()

lib/matplotlib/tests/test_cbook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
assert_array_almost_equal)
1414
from nose.tools import (assert_equal, assert_not_equal, raises, assert_true,
1515
assert_raises)
16-
from nose.plugins.skip import SkipTest
1716
from matplotlib.testing.decorators import cleanup
17+
from matplotlib.testing import skip
1818

1919
import matplotlib.cbook as cbook
2020
import matplotlib.colors as mcolors
@@ -549,7 +549,7 @@ def test_to_filehandle_accept_pathlib():
549549
try:
550550
from pathlib import Path
551551
except ImportError:
552-
raise SkipTest("pathlib not installed")
552+
skip("pathlib not installed")
553553
from tempfile import NamedTemporaryFile
554554

555555
tmpfile = NamedTemporaryFile(delete=False)

lib/matplotlib/tests/test_figure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from six.moves import xrange
66

77
from nose.tools import assert_equal, assert_true
8-
from nose.plugins.skip import SkipTest
98

109
from matplotlib import rcParams
1110
from matplotlib.testing.decorators import image_comparison, cleanup
11+
from matplotlib.testing import skip
1212
from matplotlib.axes import Axes
1313
import matplotlib.pyplot as plt
1414
import numpy as np
@@ -232,7 +232,7 @@ def test_savefig_accept_pathlib_png():
232232
try:
233233
from pathlib import Path
234234
except ImportError:
235-
raise SkipTest("pathlib not installed")
235+
skip("pathlib not installed")
236236
from tempfile import NamedTemporaryFile
237237

238238
fig, ax = plt.subplots()
@@ -267,7 +267,7 @@ def test_savefig_accept_pathlib_svg():
267267
try:
268268
from pathlib import Path
269269
except ImportError:
270-
raise SkipTest("pathlib not installed")
270+
skip("pathlib not installed")
271271
from tempfile import NamedTemporaryFile
272272

273273
fig, ax = plt.subplots()
@@ -302,7 +302,7 @@ def test_savefig_accept_pathlib_pdf():
302302
try:
303303
from pathlib import Path
304304
except ImportError:
305-
raise SkipTest("pathlib not installed")
305+
skip("pathlib not installed")
306306
from tempfile import NamedTemporaryFile
307307

308308
fig, ax = plt.subplots()

lib/matplotlib/tests/test_image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
import os
77

88
from nose.plugins.attrib import attr
9-
from nose.plugins.skip import SkipTest
109

1110
import numpy as np
1211

12+
from matplotlib.testing import skip
1313
from matplotlib.testing.decorators import (image_comparison,
1414
knownfailureif, cleanup)
1515
from matplotlib.image import (BboxImage, imread, NonUniformImage,
@@ -776,7 +776,7 @@ def test_imsave_accept_pathlib():
776776
try:
777777
from pathlib import Path
778778
except ImportError:
779-
raise SkipTest("pathlib not installed")
779+
skip("pathlib not installed")
780780
from tempfile import NamedTemporaryFile
781781

782782
a = np.array([[1, 2], [3, 4]])

0 commit comments

Comments
 (0)
0