Skip to content

Commit 24e9946

Browse files
committed
Test changes
1 parent b520f86 commit 24e9946

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9902,12 +9902,14 @@ def test_pie_all_zeros():
99029902
ax.pie([0, 0], labels=["A", "B"])
99039903

99049904

9905-
def test_set_axes_with_none_limits():
9905+
def test_get_legend_return_type():
99069906
fig, ax = plt.subplots()
9907-
xlim_before = ax.get_xlim()
9908-
ylim_before = ax.get_ylim()
99099907

9910-
ax.set(xlim=None, ylim=None)
9908+
assert ax.get_legend() is None
99119909

9912-
assert ax.get_xlim() == xlim_before
9913-
assert ax.get_ylim() == ylim_before
9910+
ax.plot([1, 2], label="Line")
9911+
ax.legend()
9912+
9913+
legend = ax.get_legend()
9914+
assert legend is not None
9915+
assert isinstance(legend, matplotlib.legend.Legend)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy