mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-01 04:14:24 +01:00
Added answers to the report
This commit is contained in:
@@ -313,7 +313,8 @@ def pytest_runtest_makereport(item: Any, call: Any) -> None:
|
||||
)
|
||||
|
||||
if call.when == "call":
|
||||
generate_single_call_report(item, call, challenge_data)
|
||||
answers = getattr(item, 'answers', None)
|
||||
generate_single_call_report(item, call, challenge_data, answers)
|
||||
|
||||
if call.when == "teardown":
|
||||
finalize_reports(item, challenge_data)
|
||||
|
||||
@@ -53,7 +53,7 @@ def update_regression_tests(
|
||||
|
||||
|
||||
def generate_single_call_report(
|
||||
item: Any, call: Any, challenge_data: dict[str, Any]
|
||||
item: Any, call: Any, challenge_data: dict[str, Any], answers: dict[str, Any]
|
||||
) -> None:
|
||||
try:
|
||||
difficulty = challenge_data["info"]["difficulty"]
|
||||
@@ -87,6 +87,9 @@ def generate_single_call_report(
|
||||
},
|
||||
# "answers": answers,
|
||||
}
|
||||
if answers:
|
||||
info_details["answers"] = answers
|
||||
|
||||
if "metadata" in challenge_data:
|
||||
info_details["metadata"] = challenge_data["metadata"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user