Spaces:
Sleeping
Sleeping
Revalidate bug-first test expected values
Browse files3016 unmodified lines30173018301930203021302030213022302330243025302630273028302930303031303230333034303530363016 unmodified lines all_tests_with_expected.append(test_entry) if os.getenv("CHALLENGE_PIPELINE", "legacy").strip().lower() == "bug_first": public_tests = data.get("public_tests") or [] secret_tests = data.get("secret_tests") or [] revalidated_detecting = [] for tc in detecting_tests: args = tc.get("args", "()") before_ok, before_result = _try_exec(source_before_bug, func_name, args, current_file) if before_ok: revalidated_detecting.append({ "args": args, "expected": before_result, "expected_is_repr": True, }) public_tests = revalidated_detecting[:5] secret_tests = revalidated_detecting[5:10] if len(public_tests) < 5 or len(secret_tests) < 5: continue bug_specific_tests[func_name] = public_tests + secret_tests else: bug_specific_tests[func_name] = all_tests_with_expectedarchitect/saboteur.py+14-2