(src_file: str, tgt_file: str, fix: Callable)
| 7 | |
| 8 | |
| 9 | def evolve(src_file: str, tgt_file: str, fix: Callable): |
| 10 | with open(src_file) as f: |
| 11 | data = [json.loads(line) for line in f.readlines() if line] |
| 12 | |
| 13 | data = fix(data) |
| 14 | with open(tgt_file, "wb") as f: |
| 15 | for x in data: |
| 16 | f.write((json.dumps(x) + "\n").encode("utf-8")) |
| 17 | |
| 18 | |
| 19 | def replay_contract(data: dict, tid: int) -> dict: |
no test coverage detected