Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-103661: Skip failing test on Windows. #103662

Merged
merged 1 commit into from
Apr 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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