Synchronize pair cast metadata
This commit is contained in:
@@ -3976,6 +3976,16 @@ def _expect_pair(pair: dict[str, Any], name: str) -> None:
|
||||
_expect_custom_row(pair.get("hardcore_row") or {}, f"{name}.hardcore_row")
|
||||
_expect_text(f"{name}.shared_descriptor", pair.get("shared_descriptor"), 12)
|
||||
_expect(pair.get("shared_cast_descriptors"), f"{name}.shared_cast_descriptors should not be empty")
|
||||
shared_cast_text = "; ".join(str(item).strip() for item in pair.get("shared_cast_descriptors") or [] if str(item).strip())
|
||||
_expect(
|
||||
pair["hardcore_row"].get("cast_descriptor_text") == shared_cast_text,
|
||||
f"{name}.hardcore_row cast descriptors drifted from pair root",
|
||||
)
|
||||
if pair.get("options", {}).get("softcore_cast") == "same_as_hardcore":
|
||||
_expect(
|
||||
pair["softcore_row"].get("cast_descriptor_text") == shared_cast_text,
|
||||
f"{name}.softcore_row cast descriptors drifted from same-cast pair root",
|
||||
)
|
||||
_expect_text(f"{name}.softcore_prompt", pair.get("softcore_prompt"), 20)
|
||||
_expect_text(f"{name}.hardcore_prompt", pair.get("hardcore_prompt"), 20)
|
||||
_expect_trigger_once(f"{name}.softcore_prompt", pair.get("softcore_prompt"), Trigger)
|
||||
|
||||
Reference in New Issue
Block a user