|
13 | 13 | from matplotlib import patheffects
|
14 | 14 | from matplotlib.testing.decorators import cleanup, knownfailureif
|
15 | 15 |
|
| 16 | +from nose.tools import assert_equal |
| 17 | + |
16 | 18 |
|
17 | 19 | needs_ghostscript = knownfailureif(
|
18 | 20 | matplotlib.checkdep_ghostscript()[0] is None,
|
@@ -51,8 +53,8 @@ def _test_savefig_to_stringio(format='ps', use_log=False):
|
51 | 53 | # could change from run to run, such as the time.
|
52 | 54 | values = [re.sub(b'%%.*?\n', b'', x) for x in values]
|
53 | 55 |
|
54 |
| - assert values[0] == values[1] |
55 |
| - assert values[1] == values[2].replace(b'\r\n', b'\n') |
| 56 | + assert_equal(values[0], values[1]) |
| 57 | + assert_equal(values[1], values[2].replace(b'\r\n', b'\n')) |
56 | 58 | for buffer in buffers:
|
57 | 59 | buffer.close()
|
58 | 60 |
|
@@ -112,13 +114,13 @@ def test_composite_image():
|
112 | 114 | fig.savefig(ps, format="ps")
|
113 | 115 | ps.seek(0)
|
114 | 116 | buff = ps.read()
|
115 |
| - assert buff.count(six.b(' colorimage')) == 1 |
| 117 | + assert_equal(buff.count(six.b(' colorimage')), 1) |
116 | 118 | plt.rcParams['image.composite_image'] = False
|
117 | 119 | with io.BytesIO() as ps:
|
118 | 120 | fig.savefig(ps, format="ps")
|
119 | 121 | ps.seek(0)
|
120 | 122 | buff = ps.read()
|
121 |
| - assert buff.count(six.b(' colorimage')) == 2 |
| 123 | + assert_equal(buff.count(six.b(' colorimage')), 2) |
122 | 124 |
|
123 | 125 |
|
124 | 126 | @cleanup
|
|
0 commit comments