()
| 64 | |
| 65 | |
| 66 | def test_subplotspec_args(): |
| 67 | fig, axs = plt.subplots(1, 2) |
| 68 | # should work: |
| 69 | gs = gridspec.GridSpecFromSubplotSpec(2, 1, |
| 70 | subplot_spec=axs[0].get_subplotspec()) |
| 71 | assert gs.get_topmost_subplotspec() == axs[0].get_subplotspec() |
| 72 | with pytest.raises(TypeError, match="subplot_spec must be type SubplotSpec"): |
| 73 | gs = gridspec.GridSpecFromSubplotSpec(2, 1, subplot_spec=axs[0]) |
| 74 | with pytest.raises(TypeError, match="subplot_spec must be type SubplotSpec"): |
| 75 | gs = gridspec.GridSpecFromSubplotSpec(2, 1, subplot_spec=axs) |
nothing calls this directly
no test coverage detected
searching dependent graphs…