8000 TST: add tests · matplotlib/matplotlib@beeaae9 · GitHub
[go: up one dir, main page]

Skip to content

Commit beeaae9

Browse files
committed
TST: add tests
1 parent 02490b7 commit beeaae9

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5489,6 +5489,13 @@ def test_shared_scale():
54895489
assert ax.get_xscale() == 'linear'
54905490

54915491

5492+
def test_shared_bool():
5493+
with pytest.raises(TypeError):
5494+
plt.subplot(sharex=True)
5495+
with pytest.raises(TypeError):
5496+
plt.subplot(sharey=True)
5497+
5498+
54925499
def test_violin_point_mass():
54935500
"""Violin plot should handle point mass pdf gracefully."""
54945501
plt.violinplot(np.array([0, 0]))

lib/matplotlib/tests/test_pyplot.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,12 @@ def test_pyplot_box():
5151
def test_stackplot_smoke():
5252
# Small smoke test for stackplot (see #12405)
5353
plt.stackplot([1, 2, 3], [1, 2, 3])
54+
55+
56+
def test_nrows_warn():
57+
with pytest.raises(AttributeError):
58+
with pytest.warns(UserWarning) as rec:
59+
plt.subplot(nrows=1)
60+
with pytest.raises(AttributeError):
61+
with pytest.warns(UserWarning) as rec:
62+
plt.subplot(ncols=1)

0 commit comments

Comments
 (0)
0