summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_shelve.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-18 22:12:08 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-18 22:12:08 (GMT)
commit94b59bb14474b6fe5a272a2c60b65f8375e827b3 (patch)
tree82735541682508b9d056b4b4150a609caa1cd24e /Lib/test/test_shelve.py
parent8d9db047d2dde9a36197449bd66ea8b0dc42286d (diff)
downloadcpython-94b59bb14474b6fe5a272a2c60b65f8375e827b3.zip
cpython-94b59bb14474b6fe5a272a2c60b65f8375e827b3.tar.gz
cpython-94b59bb14474b6fe5a272a2c60b65f8375e827b3.tar.bz2
Use test_support.unlink() instead of os.unlink().
Diffstat (limited to 'Lib/test/test_shelve.py')
-rw-r--r--Lib/test/test_shelve.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_shelve.py b/Lib/test/test_shelve.py
index 8e57121..802462c 100644
--- a/Lib/test/test_shelve.py
+++ b/Lib/test/test_shelve.py
@@ -1,4 +1,3 @@
-import os
import unittest
import shelve
import glob
@@ -6,11 +5,11 @@ from test import test_support
class TestCase(unittest.TestCase):
- fn = "shelftemp" + os.extsep + "db"
+ fn = "shelftemp.db"
def tearDown(self):
for f in glob.glob(self.fn+"*"):
- os.unlink(f)
+ test_support.unlink(f)
def test_ascii_file_shelf(self):
s = shelve.open(self.fn, protocol=0)
@@ -97,7 +96,7 @@ class TestShelveBase(mapping_tests.BasicTestMappingProtocol):
self._db = []
if not self._in_mem:
for f in glob.glob(self.fn+"*"):
- os.unlink(f)
+ test_support.unlink(f)
class TestAsciiFileShelve(TestShelveBase):
_args={'protocol':0}