Datasets:
Download v3/test_targeted.py from Louistiti/openenv-python-repair: direct link, hf CLI and curl.
- Browser
- Download file 1.5 kB
-
https://huggingface.co/datasets/Louistiti/openenv-python-repair/resolve/main/v3/test_targeted.py
- Command line
-
hf download hf://datasets/Louistiti/openenv-python-repair/v3/test_targeted.py
-
curl -L -o test_targeted.py https://huggingface.co/datasets/Louistiti/openenv-python-repair/resolve/main/v3/test_targeted.py
1.5 kB
| """Every designed defect must fail its intended edge group, not just random noise.""" | |
| import pytest | |
| from execution import grade | |
| from tasks import make_task | |
| TARGETS=[ | |
| ('ledger','identity.py','identity'),('ledger','lots.py','fifo'),('ledger','charges.py','fee'), | |
| ('capacity','events.py','half_open'),('capacity','rules.py','strict'),('capacity','merge.py','merge'), | |
| ('workflow','graph.py','missing'),('workflow','timing.py','join'),('workflow','report.py','deadline'), | |
| ('incident','order.py','ties'),('incident','window.py','boundary'),('incident','resetter.py','reset_scope'), | |
| ('sensor','dedup.py','dedup'),('sensor','convert.py','convert'),('sensor','stats.py','median'), | |
| ('reconcile','parse.py','quoting'),('reconcile','keys.py','unicode'),('reconcile','amounts.py','sign'), | |
| ('allocation','network.py','reroute'),('allocation','paths.py','reroute'),('allocation','augment.py','bottleneck'), | |
| ('expression','lex.py','literal'),('expression','binding.py','power'),('expression','unary.py','unary'), | |
| ] | |
| def test_every_defect_has_deterministic_edge_witness(family,path,group): | |
| for seed in range(3): | |
| task=make_task(f'{family}-3',seed) | |
| cases=[c for c in task.hidden if c['group']==group] | |
| assert cases | |
| assert grade(task.solution,cases)['reward']==1 | |
| single=dict(task.solution,**{path:task.starter[path]}) | |
| assert grade(single,cases)['reward']==0,(family,path,group,seed) | |