Kaydet (Commit) 4c0b7070 authored tarafından Éric Araujo's avatar Éric Araujo

Squash last tempdir leak in packaging tests.

Sweet taste of victory!  Alexis, you can fix the threads leaks :)
üst a372de84
"""Tests for the packaging.pypi.dist module.""" """Tests for the packaging.pypi.dist module."""
import os import os
import shutil
from packaging.version import VersionPredicate from packaging.version import VersionPredicate
from packaging.pypi.dist import (ReleaseInfo, ReleasesList, DistInfo, from packaging.pypi.dist import (ReleaseInfo, ReleasesList, DistInfo,
split_archive_name, get_infos_from_url) split_archive_name, get_infos_from_url)
...@@ -185,6 +186,7 @@ class TestDistInfo(TempdirManager, unittest.TestCase): ...@@ -185,6 +186,7 @@ class TestDistInfo(TempdirManager, unittest.TestCase):
dist2 = Dist(url=url) dist2 = Dist(url=url)
# doing an unpack # doing an unpack
dist2_there = dist2.unpack() dist2_there = dist2.unpack()
self.addCleanup(shutil.rmtree, dist2_there)
dist2_result = os.listdir(dist2_there) dist2_result = os.listdir(dist2_there)
self.assertIn('paf', dist2_result) self.assertIn('paf', dist2_result)
os.remove(os.path.join(dist2_there, 'paf')) os.remove(os.path.join(dist2_there, 'paf'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment