(x, rotation, halign)
| 700 | (0.3, 0, 'right'), |
| 701 | (0.3, 185, 'left')]) |
| 702 | def test_wrap(x, rotation, halign): |
| 703 | fig = plt.figure(figsize=(18, 18)) |
| 704 | gs = GridSpec(nrows=3, ncols=3, figure=fig) |
| 705 | subfig = fig.add_subfigure(gs[1, 1]) |
| 706 | # we only use the central subfigure, which does not align with any |
| 707 | # figure boundary, to ensure only subfigure boundaries are relevant |
| 708 | s = 'This is a very long text that should be wrapped multiple times.' |
| 709 | text = subfig.text(x, 0.7, s, wrap=True, rotation=rotation, ha=halign) |
| 710 | fig.canvas.draw() |
| 711 | assert text._get_wrapped_text() == ('This is a very long\n' |
| 712 | 'text that should be\n' |
| 713 | 'wrapped multiple\n' |
| 714 | 'times.') |
| 715 | |
| 716 | |
| 717 | def test_mathwrap(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…