GH-111485: Test the new cases generator (GH-113252)

This commit is contained in:
Mark Shannon 2023-12-18 11:14:40 +00:00 committed by GitHub
parent 4a24bf9a13
commit 771903596b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 116 additions and 88 deletions

View file

@ -22,8 +22,10 @@ DEFAULT_INPUT = (ROOT / "Python/bytecodes.c").absolute().as_posix()
def root_relative_path(filename: str) -> str:
return Path(filename).absolute().relative_to(ROOT).as_posix()
try:
return Path(filename).absolute().relative_to(ROOT).as_posix()
except ValueError:
return filename
def write_header(generator: str, sources: list[str], outfile: TextIO) -> None:
outfile.write(