[Python-checkins] gh-103661: Skip failing test on Windows. (#103662)

jaraco webhook-mailer at python.org
Fri Apr 21 11:31:10 EDT 2023


https://github.com/python/cpython/commit/dc328d398d8f65ec6d2fa493e16ceee75f6d774a
commit: dc328d398d8f65ec6d2fa493e16ceee75f6d774a
branch: main
author: Jason R. Coombs <jaraco at jaraco.com>
committer: jaraco <jaraco at jaraco.com>
date: 2023-04-21T11:30:30-04:00
summary:

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

files:
M Lib/test/test_importlib/test_metadata_api.py

diff --git a/Lib/test/test_importlib/test_metadata_api.py b/Lib/test/test_importlib/test_metadata_api.py
index 33c6e85ee947..d9027861848e 100644
--- a/Lib/test/test_importlib/test_metadata_api.py
+++ b/Lib/test/test_importlib/test_metadata_api.py
@@ -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'



More information about the Python-checkins mailing list