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

Skip to content

Commit d3471ab

Browse files
committed
TST: exercise changing the orientation
1 parent 79532c3 commit d3471ab

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/matplotlib/tests/test_backend_ps.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
# This tests tends to hit a TeX cache lock on AppVeyor.
2929
@pytest.mark.flaky(reruns=3)
30+
@pytest.mark.parametrize('orientation', ['portrait', 'landscape'])
3031
@pytest.mark.parametrize('format, use_log, rcParams', [
3132
('ps', False, {}),
3233
pytest.param('ps', False, {'ps.usedistiller': 'ghostscript'},
@@ -45,7 +46,8 @@
4546
'eps afm',
4647
'eps with usetex'
4748
])
48-
def test_savefig_to_stringio(format, use_log, rcParams, monkeypatch):
49+
def test_savefig_to_stringio(format, use_log, rcParams, orientation,
50+
monkeypatch):
4951
mpl.rcParams.update(rcParams)
5052
monkeypatch.setenv("SOURCE_DATE_EPOCH", "0") # For reproducibility.
5153

@@ -61,8 +63,8 @@ def test_savefig_to_stringio(format, use_log, rcParams, monkeypatch):
6163
if not mpl.rcParams["text.usetex"]:
6264
title += " \N{MINUS SIGN}\N{EURO SIGN}"
6365
ax.set_title(title)
64-
fig.savefig(s_buf, format=format)
65-
fig.savefig(b_buf, format=format)
66+
fig.savefig(s_buf, format=format, orientation=orientation)
67+
fig.savefig(b_buf, format=format, orientation=orientation)
6668

6769
s_val = s_buf.getvalue().encode('ascii')
6870
b_val = b_buf.getvalue()

0 commit comments

Comments
 (0)