# requires: pytest import verify def test_failed_check_marks_record(tmp_path): (tmp_path / "test_bad.py").write_text("def test_x():\n assert 1 == 2\n") out = tmp_path / "v.md" code = verify.main(["--task", "t", "--check", "pytest -q test_bad.py", "--cwd", str(tmp_path), "--out", str(out)]) text = out.read_text(encoding="utf-8") assert code == 1 and "结论:未通过" in text and "| `pytest -q test_bad.py` | 1 |" in text def test_sample_passes(): assert verify.main(["--task", "sample"]) == 0