[Twisted-Python] Re: [Twisted-commits] cleanup after test

Brian Warner warner at lothar.com
Sun Apr 6 21:56:28 MDT 2003


> > Twisted/twisted/test/test_journal.py 1.8 1.9
> > 
> > Log message:
> > cleanup after test
> 
> Hmm, what's the point of this? I thought any files you create get
> stored in the _trial_temp directory (because trial os.chdir()s, or
> something), which is explicitly left around for post-mortem
> debugging. Or were these tests creating files explicitly in other
> locations?

Both test_journal and test_logfile use tempfile.mktemp(), which creates new
directories in /tmp. Neither one removed the generated files (test_logfile
had code to do it, but it was commented out). pyramid had nearly a thousand
spurious /tmp/@1234.5 directories, all owned by me because the buildbot was
creating another dozen or so each time the test suite got run.

Those two tests could probably be modified to create temp file in the current
directory, but that change seemed like it had a higher probability of
failing.

cheers,
 -Brian

PS: folks who have run tests on pyramid, please check /tmp/ (and /tmp in the
sid-chroot) for leftover @1234.5 directories and delete them. You'll have to
do a 'chmod a+rwx' on them first because of a bug in the old cleanup code
(chmod(777) instead of chmod(0777)).




More information about the Twisted-Python mailing list