GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix tests following test_non_affine_caching, which was leaving a figure behind by mdboom · Pull Request #943 · matplotlib/matplotlib

Conversation

@mdboom

@mdboom mdboom commented Jun 11, 2012

Copy link
Copy Markdown
Member

Bug introduced by #723.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mdboom
Fix tests following test_non_affine_caching, which was leaving a figu…
0acd168
…re behind.
@mdboom mdboom mentioned this pull request Jun 11, 2012
Add support for tox (http://tox.testrun.org/) and Travis CI (http://travis-ci.org/) #940
Closed
@pelson

pelson commented Jun 11, 2012

Copy link
Copy Markdown
Member

Thanks Mike, so that I know for the future, how does this issue manifest itself? Is it that a figure gets left lying around?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdboom

mdboom commented Jun 11, 2012

Copy link
Copy Markdown
Member Author

The image comparison tests create any number of figures, and then the testing framework iterates through all active figures and compares them to baseline images. This means that any tests that keep figures open will cause subsequent image comparison tests to fail. We have a decorator "@cleanup" which conveniently clears all figures after a test is run (among other memory-related cleanups).

It's a little cumbersome to have to remember this, but it seems that nose does not allow for a "global" teardown method (at least last time I looked about a year and a half ago).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pelson

pelson commented Jun 12, 2012

Copy link
Copy Markdown
Member

I wouldn't know where to go to find this information out. Is is documented anywhere? If not, would you mind adding some? (it doesn't have to be done in this ticket, which has my +1)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdboom

mdboom commented Jun 12, 2012

Copy link
Copy Markdown
Member Author

Yeah -- that's not very well documented. It is documented that figures created through pyplot are persistent and need to be forcibly cleared, but it should be added that this is of particular concern in test functions since that can have side effects on other tests. I will add a blurb to the testing documentation about this (and the cleanup decorator) in a future pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@mdboom

mdboom commented Jun 12, 2012

Copy link
Copy Markdown
Member Author

Yeah -- that's not very well documented. It is documented that figures created through pyplot are persistent and need to be forcibly cleared, but it should be added that this is of particular concern in test functions since that can have side effects on other tests. I will add a blurb to the testing documentation about this (and the cleanup decorator) in a future pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mdboom added a commit that referenced this pull request Jun 12, 2012
@mdboom
Merge pull request #943 from mdboom/transforms-fix-tests
9bfc97b
Fix tests following test_non_affine_caching, which was leaving a figure behind
@mdboom
mdboom merged commit 9bfc97b into matplotlib:master Jun 12, 2012
@mdboom
mdboom deleted the transforms-fix-tests branch March 3, 2015 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mdboom @pelson
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.