Skip to content

Commit 0f32c4f

Browse files
committed
TST: simplify test (pandas-dev#45809)
1 parent eedb617 commit 0f32c4f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/tests/plotting/frame/test_frame.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -802,9 +802,11 @@ def test_plot_scatter_without_norm(self):
802802

803803
df = DataFrame(np.random.random((10, 3)) * 100, columns=["a", "b", "c"])
804804
ax = df.plot.scatter(x="a", y="b", c="c")
805+
plot_norm = ax.collections[0].norm
805806
color_min_max = (df.c.min(), df.c.max())
806807
default_norm = mpl.colors.Normalize(*color_min_max)
807-
assert all(df.c.apply(lambda x: ax.collections[0].norm(x) == default_norm(x)))
808+
for value in df.c:
809+
assert plot_norm(value) == default_norm(value)
808810

809811
@pytest.mark.slow
810812
def test_plot_bar(self):

0 commit comments

Comments
 (0)