mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
improve unit tests in benchmark
This commit is contained in:
parent
71ac7efafe
commit
6118d91922
1 changed files with 4 additions and 1 deletions
|
@ -964,9 +964,10 @@ def run_unit_tests(original_dname, testdir, history_fname, test_files):
|
|||
|
||||
# Copy test files from original directory
|
||||
for file_path in test_files:
|
||||
src = original_dname / testdir.name / file_path
|
||||
src = original_dname / Path(*testdir.parts[-4:]) / file_path
|
||||
dst = testdir / file_path
|
||||
if src.exists():
|
||||
print("copying", src, dst)
|
||||
os.makedirs(dst.parent, exist_ok=True)
|
||||
shutil.copy(src, dst)
|
||||
|
||||
|
@ -988,6 +989,8 @@ def run_unit_tests(original_dname, testdir, history_fname, test_files):
|
|||
text=True,
|
||||
timeout=timeout,
|
||||
cwd=testdir,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
)
|
||||
|
||||
success = result.returncode == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue