diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index e4a246ba3ddd4d..902bec78451307 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -812,7 +812,9 @@ def test_copy_python_src_ignore(self): if not os.path.exists(src_dir): self.skipTest(f"cannot access Python source code directory:" f" {src_dir!r}") - landmark = os.path.join(src_dir, 'Lib', 'os.py') + # Check that the landmark copy_python_src_ignore() expects is available + # (Previously we looked for 'Lib\os.py', which is always present on Windows.) + landmark = os.path.join(src_dir, 'Modules') if not os.path.exists(landmark): self.skipTest(f"cannot access Python source code directory:" f" {landmark!r} landmark is missing")