| 314 | |
| 315 | |
| 316 | def make_fixture(root): |
| 317 | src = os.path.join(root, "src") |
| 318 | os.makedirs(src, exist_ok=True) |
| 319 | for name, text in (("math.ts", MATH_TS), ("main.ts", MAIN_TS)): |
| 320 | with open(os.path.join(src, name), "wb") as f: |
| 321 | f.write(text.encode("utf-8")) # exact bytes, identical across copies |
| 322 | for rel, text in GO_FILES: |
| 323 | path = os.path.join(root, rel.replace("/", os.sep)) |
| 324 | os.makedirs(os.path.dirname(path) or root, exist_ok=True) |
| 325 | with open(path, "wb") as f: |
| 326 | f.write(text.encode("utf-8")) |
| 327 | |
| 328 | |
| 329 | def no_project_error(index_txt, repo, cache): |