(source_dir, function_name, code_id, test_id)
| 80 | f.write(code) |
| 81 | |
| 82 | def copy_candidate_scripts(source_dir, function_name, code_id, test_id): |
| 83 | code_source_path = os.path.join(source_dir, function_name, get_script_name_from_function_name(function_name, is_test=False, variation=code_id)) |
| 84 | code_dest_path = os.path.join(source_dir, function_name, get_script_name_from_function_name(function_name, is_test=False)) |
| 85 | |
| 86 | test_source_path = os.path.join(source_dir, function_name, get_script_name_from_function_name(function_name, is_test=True, variation=test_id)) |
| 87 | test_dest_path = os.path.join(source_dir, function_name, get_script_name_from_function_name(function_name, is_test=True)) |
| 88 | |
| 89 | # Copy files |
| 90 | shutil.copyfile(code_source_path, code_dest_path) |
| 91 | shutil.copyfile(test_source_path, test_dest_path) |
| 92 | |
| 93 | def copy_and_run_pytest(source_dir, function_name, code_id, test_id, executor): |
| 94 | copy_candidate_scripts(source_dir, function_name, code_id, test_id) |
no test coverage detected