부분 컷 끝점 결과의 연속 경계 검사 수정
This commit is contained in:
@@ -384,6 +384,51 @@ class RequestTests(unittest.TestCase):
|
||||
with self.subTest(stage=input_stage, change=change), self.assertRaises(ValueError):
|
||||
run.prepare(ROOT, job)
|
||||
|
||||
def test_partial_11_allows_the_next_endpoint(self):
|
||||
folder, project, artifacts, job = endpoint_fixture(motion=True)
|
||||
images = artifacts["11-images"]["payload"]
|
||||
images["result"]["frames"] = images["result"]["frames"][:1]
|
||||
for frame in images["request"]["frames"]:
|
||||
frame["scene_name"] = "SceneA"
|
||||
artifacts["08-scenes"]["payload"]["connections"][0]["mode"] = "continuous"
|
||||
pointer = next(s for s in project["stages"] if s["stage_id"] == "11-images")
|
||||
pointer["status"] = "draft"
|
||||
job.update(artifact=pointer["artifact_path"], frame_id="c1-end", frame=10,
|
||||
start=None, end=None, cut_id=[])
|
||||
write(folder / "project.json", project)
|
||||
write(folder / "stages/08-scenes/r2/artifact.json", artifacts["08-scenes"])
|
||||
write(ROOT / job["artifact"], artifacts["11-images"])
|
||||
self.assertEqual(run.prepare(ROOT, job)["frames"], [10])
|
||||
|
||||
def test_partial_11_rejects_different_completed_boundary_paths(self):
|
||||
folder, project, artifacts, job = endpoint_fixture(motion=True)
|
||||
images = artifacts["11-images"]["payload"]
|
||||
images["result"]["frames"] = images["result"]["frames"][1:3]
|
||||
for frame in images["request"]["frames"]:
|
||||
frame["scene_name"] = "SceneA"
|
||||
artifacts["08-scenes"]["payload"]["connections"][0]["mode"] = "continuous"
|
||||
pointer = next(s for s in project["stages"] if s["stage_id"] == "11-images")
|
||||
pointer["status"] = "draft"
|
||||
job.update(artifact=pointer["artifact_path"], frame_id="c1-end", frame=10,
|
||||
start=None, end=None, cut_id=[])
|
||||
write(folder / "project.json", project)
|
||||
write(folder / "stages/08-scenes/r2/artifact.json", artifacts["08-scenes"])
|
||||
write(ROOT / job["artifact"], artifacts["11-images"])
|
||||
with self.assertRaisesRegex(ValueError, "같은 실제 PNG"):
|
||||
run.prepare(ROOT, job)
|
||||
|
||||
def test_12_rejects_partial_or_unverified_11_marked_complete(self):
|
||||
for change in ("partial", "unverified"):
|
||||
folder, project, artifacts, job = endpoint_fixture(motion=True)
|
||||
frames = artifacts["11-images"]["payload"]["result"]["frames"]
|
||||
if change == "partial":
|
||||
artifacts["11-images"]["payload"]["result"]["frames"] = frames[:1]
|
||||
else:
|
||||
frames[1]["media"]["verified"] = False
|
||||
write(folder / "stages/11-images/r2/artifact.json", artifacts["11-images"])
|
||||
with self.subTest(change=change), self.assertRaisesRegex(ValueError, "완료 선행 결과"):
|
||||
run.prepare(ROOT, job)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user