阶段4(下):LangChain 1.x、提示词与注入防护、模型侧(路由/vLLM/LoRA)、AI 编程工具与验证、Dify/Coze 专题
This commit is contained in:
1 parent
caaec830b3
commit
7a32d2c9a6
38 files changed
+3059
-67
No files matched your search
@@ -0,0 +1,14 @@
|
||||
# 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
|
||||
Reference in new issue
Block a user