|
4 | 4 | from __future__ import (absolute_import, division, print_function, |
5 | 5 | unicode_literals) |
6 | 6 |
|
7 | | -import six |
8 | 7 | import itertools |
9 | 8 | import matplotlib.lines as mlines |
10 | | -import nose |
11 | | -from nose.tools import assert_true, assert_raises |
| 9 | +from numpy.testing import assert_raises |
12 | 10 | from timeit import repeat |
13 | 11 | import numpy as np |
14 | 12 | from cycler import cycler |
@@ -59,7 +57,7 @@ def test_invisible_Line_rendering(): |
59 | 57 |
|
60 | 58 | slowdown_factor = (t_unvisible_line/t_no_line) |
61 | 59 | slowdown_threshold = 2 # trying to avoid false positive failures |
62 | | - assert_true(slowdown_factor < slowdown_threshold) |
| 60 | + assert slowdown_factor < slowdown_threshold |
63 | 61 |
|
64 | 62 |
|
65 | 63 | @cleanup |
@@ -186,10 +184,6 @@ def test_lw_scaling(): |
186 | 184 |
|
187 | 185 | def test_nan_is_sorted(): |
188 | 186 | line = mlines.Line2D([], []) |
189 | | - assert_true(line._is_sorted(np.array([1, 2, 3]))) |
190 | | - assert_true(line._is_sorted(np.array([1, np.nan, 3]))) |
191 | | - assert_true(not line._is_sorted([3, 5] + [np.nan] * 100 + [0, 2])) |
192 | | - |
193 | | - |
194 | | -if __name__ == '__main__': |
195 | | - nose.runmodule(argv=['-s', '--with-doctest'], exit=False) |
| 187 | + assert line._is_sorted(np.array([1, 2, 3])) |
| 188 | + assert line._is_sorted(np.array([1, np.nan, 3])) |
| 189 | + assert not line._is_sorted([3, 5] + [np.nan] * 100 + [0, 2]) |
0 commit comments