Skip to content

Commit a756a4b

Browse files
authored
gh-138313: Suppress ResourceWarnings and restore skipped test (#138597)
1 parent 9c3d09b commit a756a4b

File tree

4 files changed

+4
-17
lines changed

4 files changed

+4
-17
lines changed

Lib/test/test_importlib/metadata/_issue138313.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

Lib/test/test_importlib/metadata/fixtures.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,8 @@ def setUp(self):
374374
# Add self.zip_name to the front of sys.path.
375375
self.resources = contextlib.ExitStack()
376376
self.addCleanup(self.resources.close)
377+
# workaround for #138313
378+
self.addCleanup(lambda: None)
377379

378380

379381
def parameterize(*args_set):

Lib/test/test_importlib/metadata/test_main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
)
2323

2424
from . import fixtures
25-
from . import _issue138313
2625
from ._path import Symlink
2726

2827

@@ -358,7 +357,6 @@ def test_packages_distributions_example(self):
358357
self._fixture_on_path('example-21.12-py3-none-any.whl')
359358
assert packages_distributions()['example'] == ['example']
360359

361-
@_issue138313.skip_on_buildbot
362360
def test_packages_distributions_example2(self):
363361
"""
364362
Test packages_distributions on a wheel built
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Restore skipped test and add janky workaround to prevent select buildbots
2+
from failing with a ResourceWarning.

0 commit comments

Comments
 (0)