Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix tests following test_non_affine_caching, which was leaving a figure behind#943

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mdboom merged 1 commit intomatplotlib:masterfrommdboom:transforms-fix-tests
Jun 12, 2012

Conversation

@mdboom
Copy link
Member

Bug introduced by#723.

@pelson
Copy link
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?

@mdboom
Copy link
MemberAuthor

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).

@pelson
Copy link
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)

@mdboom
Copy link
MemberAuthor

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.

1 similar comment
@mdboom
Copy link
MemberAuthor

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.

mdboom added a commit that referenced this pull requestJun 12, 2012
Fix tests following test_non_affine_caching, which was leaving a figure behind
@mdboommdboom merged commit9bfc97b intomatplotlib:masterJun 12, 2012
@mdboommdboom deleted the transforms-fix-tests branchMarch 3, 2015 18:44
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mdboom@pelson

[8]ページ先頭

©2009-2025 Movatter.jp