Revert long videos ref routing to release
This commit is contained in:
@@ -423,41 +423,6 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
|
||||
)
|
||||
self.assertEqual(dropped, [4])
|
||||
|
||||
def test_resolve_prompt_refs_keeps_named_character_images_alongside_tagged_location(self):
|
||||
refs = [
|
||||
{"kind": "character", "image": "img1", "name": "Mara"},
|
||||
{"kind": "character", "image": "img2", "name": "Jon"},
|
||||
{"kind": "location", "image": "img3", "name": "Hangar"},
|
||||
]
|
||||
|
||||
text, references, dropped = self.module.resolve_prompt_refs(
|
||||
"Mara and Jon argue inside <Picture 3>.",
|
||||
refs,
|
||||
)
|
||||
|
||||
self.assertEqual(text, "Mara and Jon argue inside <Picture 1>.")
|
||||
self.assertEqual(
|
||||
[self.module._reference_image(ref) for ref in references],
|
||||
["img3", "img1", "img2"],
|
||||
)
|
||||
self.assertEqual(dropped, [])
|
||||
|
||||
def test_resolve_prompt_refs_where_tagged_mode_stays_tag_only(self):
|
||||
refs = [
|
||||
{"kind": "character", "image": "img1", "name": "Mara"},
|
||||
{"kind": "location", "image": "img2", "name": "Hangar"},
|
||||
]
|
||||
|
||||
text, references, dropped = self.module.resolve_prompt_refs(
|
||||
"Mara waits in the hangar near <Picture 2>.",
|
||||
refs,
|
||||
include_named=False,
|
||||
)
|
||||
|
||||
self.assertEqual(text, "Mara waits in the hangar near <Picture 1>.")
|
||||
self.assertEqual([self.module._reference_image(ref) for ref in references], ["img2"])
|
||||
self.assertEqual(dropped, [])
|
||||
|
||||
def test_resolve_shot_references_uses_named_characters_without_picture_tags(self):
|
||||
refs = [
|
||||
{"kind": "character", "image": "img1", "name": "Mara"},
|
||||
@@ -479,21 +444,6 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
|
||||
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):
|
||||
refs = [
|
||||
None,
|
||||
@@ -747,21 +697,6 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
|
||||
self.assertIn("Persistent appearance for Mara: silver hair.", context)
|
||||
self.assertNotIn("Persistent wardrobe/style for Mara: red jacket.", context)
|
||||
|
||||
def test_resolve_prompt_refs_adds_named_location_refs(self):
|
||||
refs = [
|
||||
{"kind": "location", "image": "img2", "name": "Hangar", "description": "wet concrete floor"},
|
||||
]
|
||||
|
||||
rewritten, matched, dropped = self.module.resolve_prompt_refs(
|
||||
"[Generation 1] They wait in the hangar.",
|
||||
refs,
|
||||
)
|
||||
|
||||
self.assertEqual(rewritten, "[Generation 1] They wait in the hangar.")
|
||||
self.assertEqual(dropped, [])
|
||||
self.assertEqual(len(matched), 1)
|
||||
self.assertEqual(matched[0]["name"], "Hangar")
|
||||
|
||||
def test_resolve_tagged_refs_drops_reference_without_image(self):
|
||||
refs = [
|
||||
{"kind": "character", "image": None, "name": "Mara"},
|
||||
|
||||
Reference in New Issue
Block a user