]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix spurious diff if the cases generator is run on Windows (#108319)
authorAlex Waygood <Alex.Waygood@Gmail.com>
Tue, 22 Aug 2023 19:49:39 +0000 (20:49 +0100)
committerGitHub <noreply@github.com>
Tue, 22 Aug 2023 19:49:39 +0000 (20:49 +0100)
Tools/cases_generator/generate_cases.py

index 6ee68363058116077ab12ee88ccda1c79bcba930..f605dcc5e4632f39c089a2c9b7ae948fc26a724c 100644 (file)
@@ -237,7 +237,7 @@ class Generator(Analyzer):
             except ValueError:
                 # May happen on Windows if root and temp on different volumes
                 pass
-            filenames.append(filename)
+            filenames.append(filename.replace(os.path.sep, posixpath.sep))
         paths = f"\n{self.out.comment}   ".join(filenames)
         return f"{self.out.comment} from:\n{self.out.comment}   {paths}\n"