Skip to content

Commit b520f86

Browse files
committed
Added an edge case test
1 parent d0eed0e commit b520f86

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9900,3 +9900,14 @@ def test_pie_all_zeros():
99009900
fig, ax = plt.subplots()
99019901
with pytest.raises(ValueError, match="All wedge sizes are zero"):
99029902
ax.pie([0, 0], labels=["A", "B"])
9903+
9904+
9905+
def test_set_axes_with_none_limits():
9906+
fig, ax = plt.subplots()
9907+
xlim_before = ax.get_xlim()
9908+
ylim_before = ax.get_ylim()
9909+
9910+
ax.set(xlim=None, ylim=None)
9911+
9912+
assert ax.get_xlim() == xlim_before
9913+
assert ax.get_ylim() == ylim_before

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