feat(py upgrade):

This commit is contained in:
Alexander Myasoedov
2026-05-14 18:56:24 +03:00
parent 46ec775266
commit a0b2b9ec70
14 changed files with 681 additions and 558 deletions
+4 -8
View File
@@ -56,20 +56,16 @@ class TestRulesToDataset:
class TestLoadRulesAsDataset:
def test_basic_load(self):
with tempfile.TemporaryDirectory() as tmpdir:
(Path(tmpdir) / "rule1.yaml").write_text(
"""
(Path(tmpdir) / "rule1.yaml").write_text("""
name: test1
type: jailbreak
prompt: Jailbreak prompt
"""
)
(Path(tmpdir) / "rule2.yaml").write_text(
"""
""")
(Path(tmpdir) / "rule2.yaml").write_text("""
name: test2
type: harmful
prompt: Harmful prompt
"""
)
""")
dataset = load_rules_as_dataset(tmpdir)
assert len(dataset.prompts) == 2