Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Call `gc.collect` after each test only if the user asks for it #6707
Conversation
mdboom
added the
needs_review
label
Jul 8, 2016
|
I have restarted the py2.7 test two times, and it has always failed in the same spot. The other tests are also taking longer to run. I wonder if the memory usage isn't staying low and is wasting time swap thrashing? |
|
The particular failure is one of those weird ones that we have been noticing (image size mismatch for the pdf comparison for the hatching test). Perhaps the gc.collect() was masking a deeper problem? |
QuLogic
and 1 other
commented on an outdated diff
Jul 8, 2016
| @@ -0,0 +1,26 @@ | ||
| +from __future__ import (absolute_import, division, print_function, | ||
| + unicode_literals) | ||
| + | ||
| +import gc | ||
| +import os | ||
| +from nose.plugins import Plugin | ||
| + | ||
| + | ||
| +class EnforcedGC(Plugin): | ||
| + """This plugin adds option to call ``gc.collect`` after each test""" | ||
| + enabled = False | ||
| + | ||
| + def options(self, parser, env=os.environ): | ||
| + env_opt = 'COLLECT_GC_AFTER_TEST' |
QuLogic
Member
|
tacaswell
added this to the
2.1 (next point release)
milestone
Jul 8, 2016
jenshnielsen
referenced
this pull request
Jul 10, 2016
Closed
Add missing cleanup decorator to test_bar_color_cycle #6720
|
The failure was caused by an image in test_axes leaking into the test_backendpdf tests which runs right after the axes tests. See #6720 for the fix. It seems like the garbage collect mostly ensured that the figure was destroyed before the next test masking the missing cleanup decorator |
|
All tests have passed after rebasing. |
|
I'm |
Kojoley commentedJul 8, 2016
•
edited
Fixes #6705