diff options
author | Éric Araujo <merwok@netwok.org> | 2011-09-19 18:57:52 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-09-19 18:57:52 (GMT) |
commit | 4c0b7070ce1461fd54059d1fdc435ab89bdb6555 (patch) | |
tree | 93a2baf336bb9b41f7a2417d53e28f0fa0eca1dc | |
parent | a372de8408b28689c63cb5ec711e2dceffc05e92 (diff) | |
download | cpython-4c0b7070ce1461fd54059d1fdc435ab89bdb6555.zip cpython-4c0b7070ce1461fd54059d1fdc435ab89bdb6555.tar.gz cpython-4c0b7070ce1461fd54059d1fdc435ab89bdb6555.tar.bz2 |
Squash last tempdir leak in packaging tests.
Sweet taste of victory! Alexis, you can fix the threads leaks :)
-rw-r--r-- | Lib/packaging/tests/test_pypi_dist.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/packaging/tests/test_pypi_dist.py b/Lib/packaging/tests/test_pypi_dist.py index ff9a16e..43c8cbe 100644 --- a/Lib/packaging/tests/test_pypi_dist.py +++ b/Lib/packaging/tests/test_pypi_dist.py @@ -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')) |