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

Skip to content

Commit 39a2924

Browse files
committed
TST: add test of text with non finite positions
1 parent c52dd21 commit 39a2924

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/tests/test_text.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,3 +441,10 @@ def test_two_2line_texts(spacing1, spacing2):
441441
assert box1.height == box2.height
442442
else:
443443
assert box1.height != box2.height
444+
445+
446+
def test_nonfinite_pos():
447+
fig, ax = plt.subplots()
448+
ax.text(0, np.nan, 'nan')
449+
ax.text(np.inf, 0, 'inf')
450+
fig.canvas.draw()

0 commit comments

Comments
 (0)