8000 MAINT moved test_collections to pytest · matplotlib/matplotlib@24b8122 · GitHub
[go: up one dir, main page]

Skip to content

Commit 24b8122

Browse files
committed
MAINT moved test_collections to pytest
1 parent 194afed commit 24b8122

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

lib/matplotlib/tests/test_collections.py

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
from __future__ import (absolute_import, division, print_function,
55
unicode_literals)
66

7-
import six
8-
97
import io
108

11-
from nose.tools import assert_equal
129
import numpy as np
1310
from numpy.testing import assert_array_equal, assert_array_almost_equal
14-
from nose.plugins.skip import SkipTest
11+
from numpy.testing import assert_equal
12+
import pytest
1513

1614
import matplotlib.pyplot as plt
1715
import matplotlib.collections as mcollections
@@ -436,7 +434,7 @@ def test_add_collection():
436434
def test_quiver_limit 8000 s():
437435
ax = plt.axes()
438436
x, y = np.arange(8), np.arange(10)
439-
data = u = v = np.linspace(0, 10, 80).reshape(10, 8)
437+
u = v = np.linspace(0, 10, 80).reshape(10, 8)
440438
q = plt.quiver(x, y, u, v)
441439
assert_equal(q.get_datalim(ax.transData).bounds, (0., 0., 7., 9.))
442440

@@ -620,10 +618,7 @@ def test_size_in_xy():
620618

621619
@cleanup
622620
def test_pandas_indexing():
623-
try:
624-
import pandas as pd
625-
except ImportError:
626-
raise SkipTest("Pandas not installed")
621+
pd = pytest.importorskip('pandas')
627622

628623
# Should not fail break when faced with a
629624
# non-zero indexed series
@@ -652,8 +647,3 @@ def test_lslw_bcast():
652647
col.set_linestyles(['-', '-', '-'])
5A6C
653648
assert col.get_linestyles() == [(None, None)] * 3
654649
assert col.get_linewidths() == [1, 2, 3]
655-
656-
657-
if __name__ == '__main__':
658-
import nose
659-
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)

0 commit comments

Comments
 (0)
0