|
4 | 4 | from __future__ import (absolute_import, division, print_function, |
5 | 5 | unicode_literals) |
6 | 6 |
|
7 | | -import six |
8 | | - |
9 | 7 | import io |
10 | 8 |
|
11 | | -from nose.tools import assert_equal |
12 | 9 | import numpy as np |
13 | 10 | 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 |
15 | 13 |
|
16 | 14 | import matplotlib.pyplot as plt |
17 | 15 | import matplotlib.collections as mcollections |
@@ -436,7 +434,7 @@ def test_add_collection(): |
436 | 434 | def test_quiver_limits(): |
437 | 435 | ax = plt.axes() |
438 | 436 | 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) |
440 | 438 | q = plt.quiver(x, y, u, v) |
441 | 439 | assert_equal(q.get_datalim(ax.transData).bounds, (0., 0., 7., 9.)) |
442 | 440 |
|
@@ -620,10 +618,7 @@ def test_size_in_xy(): |
620 | 618 |
|
621 | 619 | @cleanup |
622 | 620 | 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') |
627 | 622 |
|
628 | 623 | # Should not fail break when faced with a |
629 | 624 | # non-zero indexed series |
@@ -652,8 +647,3 @@ def test_lslw_bcast(): |
652 | 647 | col.set_linestyles(['-', '-', '-']) |
653 | 648 | assert col.get_linestyles() == [(None, None)] * 3 |
654 | 649 | 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