On Sun, Mar 01, 2009 at 07:59:36AM -0800, Istvan Albert wrote:
-> On Mar 1, 12:41?am, "C. Titus Brown" <[email protected]> wrote:
-> 
-> > Also, Istvan, I made one or two potentially controversial changes to
-> > your test code, mostly in test running and temporary directory
-> > creation/removal. ?It might be worth going over the commit logs of the
-> > pygr-psu repository to see how much you disagree with them ;)
-> 
-> Hi Titus,
-> 
-> the reason for the changes in temporary directory design was necessary
-> due to two factors:
-> 
-> 1. to ensure that all files are closed before attempting to remove
-> them or alter them. Windows is more strict about file access and will
-> not allow certain operations to take place as long as it believes that
-> the files is still open. So one can get all kinds puzzling access
-> errors, all coming down to some module still having the file open
-> while another tries to reopen it, write to it etc.

Yes, I saw!

-> 2. to have the ability to inspect them if needed (thus know where/what
-> they are), that way failed runs can be cleaned in an external way as
-> well, data may be checked if needed etc.

Hmm, good point.  This can be addressed by a config setting easily
enough, I think; perhaps Yet Another command line option to runtest?

-> I'm not fan of reinventing any module (in this case the tempfile
-> module) but I was unable to address both of these
-> requirements without a making separate class (in the end is not all
-> that complicated, maybe a dozen lines).
-> 
-> I will take a look at your changes tomorrow and check them on
-> Windows .

I mostly used TempDir as a wrapper for the tempfile calls, so we can
flip back and forth between your implementation and the one that uses
tempfile w/o much of a problem.

However, I think it's really important from a testing perspective to
make a new directory for each test run.  Otherwise you can end up with
data that incorrectly persists across test runs & causes test boggles.
So however we move forward, I really want to discourage re-use of old
test directories!

cheers,
--t
-- 
C. Titus Brown, [email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pygr-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pygr-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to