[Zope-dev] Windows Test Failures and XMLExportImport

Chris Withers chris at simplistix.co.uk
Mon May 1 05:53:41 EDT 2006


Benji York wrote:
>> 2000--Zope---branches---2.9--2.4\build\lib\python\OFS\tests\test_XMLExportImport.py", 

I suspect the following pattern needs to be changed:

         ostream = tempfile.NamedTemporaryFile(suffix='.xml')
         try:
             data = exportXML(connection, oid, ostream)
             ostream.flush()
             sub._importObjectFromFile(ostream.name, 0, 0)
         finally:
             ostream.close()

..since I bet the file created will be locked, and when the read line 
after the flush tries to read, it's told it can't...

gotta love windows file semantics :-(

Chris

-- 
Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk


More information about the Zope-Dev mailing list