]> granicus.if.org Git - python/commitdiff
Squash last tempdir leak in packaging tests.
authorÉric Araujo <merwok@netwok.org>
Mon, 19 Sep 2011 18:57:52 +0000 (20:57 +0200)
committerÉric Araujo <merwok@netwok.org>
Mon, 19 Sep 2011 18:57:52 +0000 (20:57 +0200)
Sweet taste of victory!  Alexis, you can fix the threads leaks :)

Lib/packaging/tests/test_pypi_dist.py

index ff9a16e27b8e1453465e19322ec2fbdd04db5b4f..43c8cbef12b8696a1f089bca8c38061b1eba3407 100644 (file)
@@ -1,6 +1,7 @@
 """Tests for the packaging.pypi.dist module."""
 
 import os
+import shutil
 from packaging.version import VersionPredicate
 from packaging.pypi.dist import (ReleaseInfo, ReleasesList, DistInfo,
                                  split_archive_name, get_infos_from_url)
@@ -185,6 +186,7 @@ class TestDistInfo(TempdirManager, unittest.TestCase):
         dist2 = Dist(url=url)
         # doing an unpack
         dist2_there = dist2.unpack()
+        self.addCleanup(shutil.rmtree, dist2_there)
         dist2_result = os.listdir(dist2_there)
         self.assertIn('paf', dist2_result)
         os.remove(os.path.join(dist2_there, 'paf'))