remove long ==--- lines to save tokens

This commit is contained in:
Paul Gauthier 2023-06-28 15:44:23 -07:00
parent 51638d0989
commit ea83df1ea3
3 changed files with 62 additions and 16 deletions

View file

@ -25,10 +25,8 @@ from aider.io import InputOutput
DOCKER_IMAGE = "aider-pytest"
BENCHMARK_DNAME = Path("tmp.benchmark/.")
assert BENCHMARK_DNAME.exists() and BENCHMARK_DNAME.is_dir()
ORIGINAL_DNAME = BENCHMARK_DNAME / "practice/."
assert ORIGINAL_DNAME.exists() and ORIGINAL_DNAME.is_dir()
app = typer.Typer(add_completion=False, pretty_exceptions_enable=False)
@ -54,6 +52,9 @@ def main(
threads: int = typer.Option(1, "--threads", "-t", help="Number of threads to run in parallel"),
num_tests: int = typer.Option(-1, "--num-tests", "-n", help="Number of tests to run"),
):
assert BENCHMARK_DNAME.exists() and BENCHMARK_DNAME.is_dir()
assert ORIGINAL_DNAME.exists() and ORIGINAL_DNAME.is_dir()
repo = git.Repo(search_parent_directories=True)
commit_hash = repo.head.object.hexsha[:7]
if repo.is_dirty():
@ -419,6 +420,18 @@ def cleanup_test_output(output):
output,
flags=re.MULTILINE,
)
res = re.sub(
r"^====*$",
"====",
res,
flags=re.MULTILINE,
)
res = re.sub(
r"^----*$",
"----",
res,
flags=re.MULTILINE,
)
return res