mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +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
|
# Copy test files from original directory
|
||||||
for file_path in test_files:
|
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
|
dst = testdir / file_path
|
||||||
if src.exists():
|
if src.exists():
|
||||||
|
print("copying", src, dst)
|
||||||
os.makedirs(dst.parent, exist_ok=True)
|
os.makedirs(dst.parent, exist_ok=True)
|
||||||
shutil.copy(src, dst)
|
shutil.copy(src, dst)
|
||||||
|
|
||||||
|
@ -988,6 +989,8 @@ def run_unit_tests(original_dname, testdir, history_fname, test_files):
|
||||||
text=True,
|
text=True,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
cwd=testdir,
|
cwd=testdir,
|
||||||
|
encoding="utf-8",
|
||||||
|
errors="replace",
|
||||||
)
|
)
|
||||||
|
|
||||||
success = result.returncode == 0
|
success = result.returncode == 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue