Skip to content

Commit 0089509

Browse files
committed
TST: test repr for category x
1 parent 88b68a6 commit 0089509

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
@@ -496,3 +496,10 @@ def test_text_as_text_opacity():
496496
plt.text(0.25, 0.5, '50% using `alpha`', alpha=0.5)
497497
plt.text(0.25, 0.75, '50% using `alpha` and 100% `color`', alpha=0.5,
498498
color=(0, 0, 0, 1))
499+
500+
501+
def test_text_repr():
502+
# smoketest to make sure text repr doesn't error for category
503+
plt.plot(['A', 'B'], [1, 2])
504+
txt = plt.text(['A'], 0.5, 'Boo')
505+
print(txt)

0 commit comments

Comments
 (0)