Skip to content

Commit

Permalink
gh-103661: Skip failing test on Windows. (#103662)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Apr 21, 2023
1 parent a4967d9 commit dc328d3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Lib/test/test_importlib/test_metadata_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,23 @@ def test_for_top_level(self):
expect_content,
)

@staticmethod
def _workaround_103661(tests):
"""
Skip failing test for now is it's failing on buildbot workers.
See https://github.com/python/cpython/issues/103661.
"""
import platform
if platform.system() == 'Windows':
tests.remove(('egg_with_no_modules-pkg', '\n'))
return tests

def test_read_text(self):
tests = [
('egginfo-pkg', 'mod\n'),
('egg_with_no_modules-pkg', '\n'),
]
for pkg_name, expect_content in tests:
for pkg_name, expect_content in self._workaround_103661(tests):
with self.subTest(pkg_name):
top_level = [
path for path in files(pkg_name) if path.name == 'top_level.txt'
Expand Down

0 comments on commit dc328d3

Please sign in to comment.