8000 Fix unit tests, v3 · matplotlib/matplotlib@8899bae · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8899bae

Browse files
committed
Fix unit tests, v3
Fix unit tests, v3
1 parent 94b4d83 commit 8899bae

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/matplotlib/tests/test_colorbar.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,19 +311,19 @@ def test_colorbar_minorticks_on_off():
311311
data = np.random.uniform(low=1, high=10, size=(20, 20))
312312

313313
fig, ax = plt.subplots()
314-
im = ax.pcolormesh(data, norm=mpl.colors.LogNorm())
314+
im = ax.pcolormesh(data, norm=LogNorm())
315315
cbar = fig.colorbar(im)
316316
default_minorticklocks = cbar.ax.yaxis.get_minorticklocs()
317317

318318
# test that minorticks turn off for LogNorm
319319
cbar.minorticks_off()
320-
np.testing.assert_almost_equal(cbar.ax.yaxis.get_minorticklocs(),
321-
np.array([]))
320+
assert np.array_equal(cbar.ax.yaxis.get_minorticklocs(),
321+
np.array([]))
322322

323323
# test that minorticks turn back on for LogNorm
324324
cbar.minorticks_on()
325-
np.testing.assert_almost_equal(cbar.ax.yaxis.get_minorticklocs(),
326-
default_minorticklocks)
325+
assert np.array_equal(cbar.ax.yaxis.get_minorticklocs(),
326+
default_minorticklocks)
327327

328328

329329
def test_colorbar_autoticks():

0 commit comments

Comments
 (0)
0