Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7037e85

Browse files
committed
TST: Switch to fig.draw_without_rendering() in test.
1 parent 17f0ef3 commit 7037e85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8040,8 +8040,8 @@ def test_centered_bar_label_nonlinear():
80408040
ax.set_axis_off()
80418041

80428042

8043-
def test_centered_bar_label_label_beyond_limits(tmp_path):
8044-
_, ax = plt.subplots()
8043+
def test_centered_bar_label_label_beyond_limits():
8044+
fig, ax = plt.subplots()
80458045

80468046
last = 0
80478047
for label, value in zip(['a', 'b', 'c'], [10, 20, 50]):
@@ -8050,7 +8050,7 @@ def test_centered_bar_label_label_beyond_limits(tmp_path):
80508050
last += value
80518051
ax.set_xlim(None, 20)
80528052

8053-
plt.savefig(tmp_path / 'test')
8053+
fig.draw_without_rendering()
80548054

80558055

80568056
def test_bar_label_location_errorbars():

0 commit comments

Comments
 (0)