Restore release-era character ref routing
This commit is contained in:
+1463
-1559
File diff suppressed because it is too large
Load Diff
@@ -458,42 +458,6 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
|
|||||||
self.assertEqual([self.module._reference_image(ref) for ref in references], ["img2"])
|
self.assertEqual([self.module._reference_image(ref) for ref in references], ["img2"])
|
||||||
self.assertEqual(dropped, [])
|
self.assertEqual(dropped, [])
|
||||||
|
|
||||||
def test_resolve_shot_references_uses_named_characters_without_picture_tags(self):
|
|
||||||
refs = [
|
|
||||||
{"kind": "character", "image": "img1", "name": "Mara"},
|
|
||||||
{"kind": "character", "image": "img2", "name": "Jon"},
|
|
||||||
{"kind": "location", "image": "img3", "name": "Hangar"},
|
|
||||||
]
|
|
||||||
|
|
||||||
text, references, dropped, shot_tag_driven, mode_eff = self.module.resolve_shot_references(
|
|
||||||
"[Generation 1] Mara crosses the hangar.",
|
|
||||||
refs,
|
|
||||||
"auto ref2v",
|
|
||||||
0,
|
|
||||||
None,
|
|
||||||
)
|
|
||||||
|
|
||||||
self.assertEqual(text, "[Generation 1] Mara crosses the hangar.")
|
|
||||||
self.assertEqual([self.module._reference_image(ref) for ref in references], ["img1"])
|
|
||||||
self.assertEqual(dropped, [])
|
|
||||||
self.assertFalse(shot_tag_driven)
|
|
||||||
self.assertEqual(mode_eff, "auto ref2v")
|
|
||||||
|
|
||||||
def test_resolve_prompt_refs_prioritizes_characters_before_locations(self):
|
|
||||||
refs = [
|
|
||||||
{"kind": "location", "image": "img1", "name": "Hangar"},
|
|
||||||
{"kind": "character", "image": "img2", "name": "Mara"},
|
|
||||||
]
|
|
||||||
|
|
||||||
text, references, dropped = self.module.resolve_prompt_refs(
|
|
||||||
"[Generation 1] Mara waits in the hangar.",
|
|
||||||
refs,
|
|
||||||
)
|
|
||||||
|
|
||||||
self.assertEqual(text, "[Generation 1] Mara waits in the hangar.")
|
|
||||||
self.assertEqual([self.module._reference_image(ref) for ref in references], ["img2", "img1"])
|
|
||||||
self.assertEqual(dropped, [])
|
|
||||||
|
|
||||||
def test_shot_references_uses_all_connected_sparse_slots(self):
|
def test_shot_references_uses_all_connected_sparse_slots(self):
|
||||||
refs = [
|
refs = [
|
||||||
None,
|
None,
|
||||||
|
|||||||
Reference in New Issue
Block a user