summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2008-04-17 04:21:10 (GMT)
committerBrett Cannon <bcannon@gmail.com>2008-04-17 04:21:10 (GMT)
commitdc3e06ce3a24882a6b68ec19544910095770111e (patch)
treee6ac938221e338c3c1368160f8c840094b920903
parent7ab6be216af6fccae655bd5402ae0ad22447f37a (diff)
downloadcpython-dc3e06ce3a24882a6b68ec19544910095770111e.zip
cpython-dc3e06ce3a24882a6b68ec19544910095770111e.tar.gz
cpython-dc3e06ce3a24882a6b68ec19544910095770111e.tar.bz2
Have test_coding conditionally remove test files instead of assuming that they
are always there.
-rw-r--r--Lib/test/test_coding.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_coding.py b/Lib/test/test_coding.py
index b7d4478..b1664f4 100644
--- a/Lib/test/test_coding.py
+++ b/Lib/test/test_coding.py
@@ -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():