[Checkins] SVN: zope.app.locales/trunk/src/zope/app/locales/tests.py Try to fix a test on windows by not opening the same file twice.

Gediminas Paulauskas menesis at pov.lt
Mon Feb 20 13:01:18 UTC 2012


Log message for revision 124430:
  Try to fix a test on windows by not opening the same file twice.
  

Changed:
  U   zope.app.locales/trunk/src/zope/app/locales/tests.py

-=-
Modified: zope.app.locales/trunk/src/zope/app/locales/tests.py
===================================================================
--- zope.app.locales/trunk/src/zope/app/locales/tests.py	2012-02-20 12:51:54 UTC (rev 124429)
+++ zope.app.locales/trunk/src/zope/app/locales/tests.py	2012-02-20 13:01:18 UTC (rev 124430)
@@ -17,7 +17,6 @@
 import doctest
 import os
 import unittest
-import tempfile
 import zope.app.locales
 import zope.component
 import zope.configuration.xmlconfig
@@ -168,7 +167,7 @@
     r"""Test for POTMaker.write
 
         >>> from zope.app.locales.extract import POTMaker
-        >>> f, path = tempfile.mkstemp()
+        >>> path = 'test.pot'
         >>> pm = POTMaker(path, '')
         >>> pm.add({'msgid1': [('file2.py', 2), ('file1.py', 3)],
         ...         'msgid2': [('file1.py', 5)]})
@@ -216,7 +215,7 @@
         <BLANKLINE>
 
         >>> f.close()
-        >>> os.unlink(path)
+        >>> os.remove(path)
 
     """
 



More information about the checkins mailing list