test(content-build): cover status, empty-knows, non-npc start_disposition, empty-rungs
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -105,3 +105,29 @@ def test_missing_ladder():
|
||||
def test_illegal_start_disposition():
|
||||
with pytest.raises(BuildError):
|
||||
resolve([ladder(), town(), rumor(), npc(start_disposition="besties")])
|
||||
|
||||
|
||||
def test_illegal_status():
|
||||
bad = Entry(id="town.a", type="town", status="draft", secrecy=0,
|
||||
related=[], body="x", source="t:9")
|
||||
with pytest.raises(BuildError):
|
||||
resolve([ladder(), bad])
|
||||
|
||||
|
||||
def test_npc_empty_knows_rejected():
|
||||
with pytest.raises(BuildError):
|
||||
resolve([ladder(), town(), rumor(), npc(knows=[])])
|
||||
|
||||
|
||||
def test_non_npc_with_start_disposition_rejected():
|
||||
rec = Entry(id="person.p", type="person", status="canon", secrecy=0,
|
||||
related=[], body="x", source="t:9", start_disposition="cold")
|
||||
with pytest.raises(BuildError):
|
||||
resolve([ladder(), town(), rumor(), rec])
|
||||
|
||||
|
||||
def test_empty_rungs_rejected():
|
||||
empty = Entry(id="rule.disposition-ladder", type="rule", status="canon",
|
||||
secrecy=0, related=[], body="x", source="t:1", rungs=[])
|
||||
with pytest.raises(BuildError):
|
||||
resolve([empty])
|
||||
|
||||
Reference in New Issue
Block a user