python-pillow/Pillow — pull request #732 by wiredfool (2014-06-26 05:48:15+00:00)
Title: Multithreaded testing

This is the update to the other half of the multithreading PR.

* It adds environment variables and flags to let nosetests run in parallel
* It changes the way that tempfiles are created to safely create and delete the tempfiles.
* It changes the reporting of temp files that are not cleaned up.

Tempfiles are now created using tempfile.mkstmp, the secure, unaffected by race conditions api, rather than manually creating a well known directory and adding possibly unique names in it. The tempfiles are cleaned up after each individual successful test. If not successful, then the test file is reported as remaining at that time. This allows tests to be more independent, reorderable, and not have any global state that needs cleaned up at the end of a run.

This removes tearDownModule, as it is run each time a module changes, which could be as frequently as every test. Global state in the teardown function is very difficult to handle when using multiple test runners.