Skip to content

Commit f2ff387

Browse files
Debian Science Teamrebecca-palmer
authored andcommitted
Don't fail plot tests on rounding error
(upstream seem to have _disabled_ the affected tests ...see also test_series) Author: Rebecca N. Palmer <[email protected]> Bug-Debian: https://bugs.debian.org/1029251 Forwarded: no Gbp-Pq: Name 1029251_ignore_rounding_error.patch
1 parent 0f81e89 commit f2ff387

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/tests/plotting/frame/test_frame_subplots.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import string
44

55
import numpy as np
6+
from numpy.testing import assert_array_almost_equal_nulp
67
import pytest
78

89
from pandas.compat import is_platform_linux
@@ -435,7 +436,7 @@ def test_bar_log_no_subplots(self):
435436
# no subplots
436437
df = DataFrame({"A": [3] * 5, "B": list(range(1, 6))}, index=range(5))
437438
ax = df.plot.bar(grid=True, log=True)
438-
tm.assert_numpy_array_equal(ax.yaxis.get_ticklocs(), expected)
439+
assert_array_almost_equal_nulp(ax.yaxis.get_ticklocs(), expected, 4)
439440

440441
@pytest.mark.xfail(
441442
np_version_gte1p24 and is_platform_linux(),
@@ -449,8 +450,8 @@ def test_bar_log_subplots(self):
449450
log=True, subplots=True
450451
)
451452

452-
tm.assert_numpy_array_equal(ax[0].yaxis.get_ticklocs(), expected)
453-
tm.assert_numpy_array_equal(ax[1].yaxis.get_ticklocs(), expected)
453+
assert_array_almost_equal_nulp(ax[0].yaxis.get_ticklocs(), expected, 4)
454+
assert_array_almost_equal_nulp(ax[1].yaxis.get_ticklocs(), expected, 4)
454455

455456
def test_boxplot_subplots_return_type_default(self, hist_df):
456457
df = hist_df

0 commit comments

Comments
 (0)