[Python-checkins] r62360 - python/branches/py3k/Lib/test/test_coding.py

brett.cannon python-checkins at python.org
Thu Apr 17 06:21:10 CEST 2008


Author: brett.cannon
Date: Thu Apr 17 06:21:10 2008
New Revision: 62360

Log:
Have test_coding conditionally remove test files instead of assuming that they
are always there.


Modified:
   python/branches/py3k/Lib/test/test_coding.py

Modified: python/branches/py3k/Lib/test/test_coding.py
==============================================================================
--- python/branches/py3k/Lib/test/test_coding.py	(original)
+++ python/branches/py3k/Lib/test/test_coding.py	Thu Apr 17 06:21:10 2008
@@ -1,6 +1,6 @@
 
 import test.test_support, unittest
-from test.test_support import TESTFN
+from test.test_support import TESTFN, unlink
 import os, sys
 
 class CodingTest(unittest.TestCase):
@@ -45,8 +45,8 @@
             __import__(TESTFN)
         finally:
             f.close()
-            os.remove(TESTFN+".py")
-            os.remove(TESTFN+".pyc")
+            unlink(TESTFN+".py")
+            unlink(TESTFN+".pyc")
             sys.path.pop(0)
 
 def test_main():


More information about the Python-checkins mailing list