Spaces:
Sleeping
Sleeping
Revalidate bug-first test expected values
Browse files3016 unmodified lines301730183019302030213022302330243016 unmodified linesall_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 []bug_specific_tests[func_name] = public_tests + secret_testselse:bug_specific_tests[func_name] = all_tests_with_expected3016 unmodified lines301730183019302030213022302330243025302630273028302930303031303230333034303530363016 unmodified linesall_tests_with_expected.append(test_entry)if os.getenv("CHALLENGE_PIPELINE", "legacy").strip().lower() == "bug_first":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:continuebug_specific_tests[func_name] = public_tests + secret_testselse:bug_specific_tests[func_name] = all_tests_with_expected
architect/saboteur.py+14-2