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

Skip to content

FIX: set internal flags first in FigureCanvasBase #5150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 27, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
TST: be explicit in test_backend_ps
Random thrashing to prevent the intermittent failures
  • Loading branch information
tacaswell committed Sep 27, 2015
commit 0d465acf1700dabeef66cee1940f045c3c7592f3
11 changes: 5 additions & 6 deletions lib/matplotlib/tests/test_backend_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,19 @@


def _test_savefig_to_stringio(format='ps', use_log=False):
fig, ax = plt.subplots()
buffers = [
six.moves.StringIO(),
io.StringIO(),
io.BytesIO()]

plt.figure()

if use_log:
plt.yscale('log')
ax.set_yscale('log')

plt.plot([1, 2], [1, 2])
plt.title("Déjà vu")
ax.plot([1, 2], [1, 2])
ax.set_title("Déjà vu")
for buffer in buffers:
plt.savefig(buffer, format=format)
fig.savefig(buffer, format=format)

values = [x.getvalue() for x in buffers]

Expand Down