Tell a Rust file's test modules apart as bytes and kill the surviving mutants
CI / tests (pull_request) Failing after 5m15s
CI / tests (pull_request) Failing after 5m15s
This commit is contained in:
@@ -174,7 +174,7 @@ import uuid
|
||||
|
||||
from task_bench.tasks import Asked, Bench, BUG, check_made, committed, Kind, KINDS, on_disk, Planned, SHIPPED, Task, tests_in_copy
|
||||
from task_bench.planted_mutant import bug_at_sides, Mutant
|
||||
from task_bench.rust_test_modules import modules
|
||||
from task_bench.rust_test_modules import tells_apart
|
||||
from claude_code.reply import Claude
|
||||
from task_bench.bench_folder import clear_left, held
|
||||
from task_bench.runs import closed, Containers, docker_cli, fix_attempted, MEMORY_MIB, opened, ran_tests, TimedOut, TOKEN, WORK
|
||||
@@ -492,7 +492,7 @@ def planted(bench: Bench, number: int, mutant: Mutant) -> Task | Failure | None:
|
||||
return sources
|
||||
bugs = bug_at_sides(mutant, diff, sources)
|
||||
# The check keeps a Rust file's test modules as planted, which it can only do where it tells them apart.
|
||||
if bugs is None or (mutant.path.endswith(".rs") and any(modules(source.decode("utf-8", "surrogateescape")) is None for source in bugs.values())):
|
||||
if bugs is None or not all(tells_apart(mutant.path, source) for source in bugs.values()):
|
||||
return None
|
||||
trees: dict[Side, str] = {}
|
||||
messages: dict[Side, str] = {}
|
||||
|
||||
Reference in New Issue
Block a user