Update django/aiservice/core/shared/testgen_review/repair.py
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
This commit is contained in:
parent
8106d53e32
commit
737a270801
1 changed files with 15 additions and 0 deletions
|
|
@ -126,6 +126,21 @@ async def testgen_repair(
|
|||
)
|
||||
|
||||
python_version = validate_request_data(testgen_data)
|
||||
instrumented_behavior, instrumented_perf = instrument_tests(repaired_code, testgen_data, python_version)
|
||||
|
||||
if instrumented_behavior is None or instrumented_perf is None:
|
||||
return 500, TestRepairErrorSchema(error="Failed to instrument repaired tests")
|
||||
|
||||
await asyncio.to_thread(ph, request.user, "aiservice-testgen-repair-completed")
|
||||
return 200, TestRepairResponseSchema(
|
||||
generated_tests=repaired_code,
|
||||
instrumented_behavior_tests=instrumented_behavior,
|
||||
instrumented_perf_tests=instrumented_perf,
|
||||
)
|
||||
|
||||
except HttpError:
|
||||
raise
|
||||
except Exception as e:
|
||||
|
||||
processed_cst, display_cst = postprocessing_testgen_pipeline(
|
||||
merged_cst,
|
||||
|
|
|
|||
Loading…
Reference in a new issue