From 94b59bb14474b6fe5a272a2c60b65f8375e827b3 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 18 May 2007 22:12:08 +0000 Subject: [PATCH] Use test_support.unlink() instead of os.unlink(). --- Lib/test/test_shelve.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_shelve.py b/Lib/test/test_shelve.py index 8e571218614..802462c4112 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}