summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2011-10-07 19:15:38 (GMT)
committerBarry Warsaw <barry@python.org>2011-10-07 19:15:38 (GMT)
commit35d18782fbb5aacf524e2d0c253b4cc2f0e1ca93 (patch)
tree21a57ee1be4956279e3f6aa23cef63a957a74baa /Lib
parentcb9c5ba73673be215e10368d160c173788d58e15 (diff)
parent532c363ac775c5499f9f00a06c84c7b1a5c4f337 (diff)
downloadcpython-35d18782fbb5aacf524e2d0c253b4cc2f0e1ca93.zip
cpython-35d18782fbb5aacf524e2d0c253b4cc2f0e1ca93.tar.gz
cpython-35d18782fbb5aacf524e2d0c253b4cc2f0e1ca93.tar.bz2
Trunk merge
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_pkgutil.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_pkgutil.py b/Lib/test/test_pkgutil.py
index f755e67..f4e0323 100644
--- a/Lib/test/test_pkgutil.py
+++ b/Lib/test/test_pkgutil.py
@@ -15,11 +15,11 @@ class PkgutilTests(unittest.TestCase):
def setUp(self):
self.dirname = tempfile.mkdtemp()
+ self.addCleanup(shutil.rmtree, self.dirname)
sys.path.insert(0, self.dirname)
def tearDown(self):
del sys.path[0]
- shutil.rmtree(self.dirname)
def test_getdata_filesys(self):
pkg = 'test_getdata_filesys'
@@ -91,9 +91,9 @@ class PkgutilTests(unittest.TestCase):
# this does not appear to create an unreadable dir on Windows
# but the test should not fail anyway
os.mkdir(d, 0)
+ self.addCleanup(os.rmdir, d)
for t in pkgutil.walk_packages(path=[self.dirname]):
self.fail("unexpected package found")
- os.rmdir(d)
class PkgutilPEP302Tests(unittest.TestCase):