Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dfb458e commit 3be4aeaCopy full SHA for 3be4aea
1 file changed
lib/matplotlib/tests/test_text.py
@@ -592,3 +592,17 @@ def test_large_subscript_title():
592
tt.set_position((x, 1.01))
593
ax.set_title('Old Way', loc='left')
594
ax.set_xticklabels('')
595
+
596
597
+def test_long_word_wrap():
598
+ fig = plt.figure(figsize=(6, 4))
599
+ text = fig.text(9.5, 8, 'Alonglineoftexttowrap', wrap=True)
600
+ fig.canvas.draw()
601
+ assert text._get_wrapped_text() == 'Alonglineoftexttowrap'
602
603
604
+def test_wrap_no_wrap():
605
606
+ text = fig.text(0, 0, 'non wrapped text', wrap=True)
607
608
+ assert text._get_wrapped_text() == 'non wrapped text'
0 commit comments