]> granicus.if.org Git - python/commitdiff
Have test_coding conditionally remove test files instead of assuming that they
authorBrett Cannon <bcannon@gmail.com>
Thu, 17 Apr 2008 04:21:10 +0000 (04:21 +0000)
committerBrett Cannon <bcannon@gmail.com>
Thu, 17 Apr 2008 04:21:10 +0000 (04:21 +0000)
are always there.

Lib/test/test_coding.py

index b7d44784f8b9f6b49f10dab82e7634e18fe5b293..b1664f4f1d98b367c17620b9cfb66d962053a27e 100644 (file)
@@ -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 @@ class CodingTest(unittest.TestCase):
             __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():