Load evil solution with kernel content inlined from the sample directory.
(sample: str)
| 146 | |
| 147 | |
| 148 | def _load_evil_sample(sample: str) -> Solution: |
| 149 | """Load evil solution with kernel content inlined from the sample directory.""" |
| 150 | sample_dir = _SAMPLES_DIR / sample |
| 151 | sol_dict = json.loads((sample_dir / "solution.json").read_text()) |
| 152 | kernel_content = (sample_dir / "kernel.py").read_text() |
| 153 | sol_dict["sources"] = [{"path": "kernel.py", "content": kernel_content}] |
| 154 | return Solution(**sol_dict) |
| 155 | |
| 156 | |
| 157 | def _run_subprocess(cmd: list[str], cwd: Path) -> subprocess.CompletedProcess: |
no test coverage detected