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

This commit is contained in:
Jason R. Coombs 2023-04-21 11:30:30 -04:00 committed by GitHub
parent a4967d9d59
commit dc328d398d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -76,12 +76,23 @@ class APITests(
expect_content, 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): def test_read_text(self):
tests = [ tests = [
('egginfo-pkg', 'mod\n'), ('egginfo-pkg', 'mod\n'),
('egg_with_no_modules-pkg', '\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): with self.subTest(pkg_name):
top_level = [ top_level = [
path for path in files(pkg_name) if path.name == 'top_level.txt' path for path in files(pkg_name) if path.name == 'top_level.txt'