Files
aigc-home/docs/hel-892/rtx-video-document-evidence/backend-initial.txt
T

116 lines
7.7 KiB
Plaintext

................................................................F....... [ 79%]
....F.............. [100%]
=================================== FAILURES ===================================
_____________ test_special_shapes_and_identity_fail_closed[empty] ______________
variant = 'empty'
@pytest.mark.parametrize(
"variant",
[
"empty",
"missing",
"connectable",
"ue",
"frontend",
"summary",
"citation",
"source_sha",
"path",
"layout",
"dynamic",
"fps_slot",
],
)
def test_special_shapes_and_identity_fail_closed(variant):
s, r = copy.deepcopy(SOURCE), copy.deepcopy(REVIEW)
ns = {n["id"]: n for n in s["nodes"]}
b = r["fixed_version_document"]
if variant == "empty":
ns[7]["widgets_values"] = []
elif variant == "missing":
del ns[7]["widgets_values"]
elif variant == "connectable":
ns[8]["properties"]["ue_properties"]["widget_ue_connectable"]["fps"] = False
elif variant == "ue":
ns[1]["properties"]["ue_properties"]["version"] = "forged"
elif variant == "frontend":
s["extra"]["frontendVersion"] = "forged"
elif variant == "summary":
b["user_overview"] = "forged"
elif variant == "citation":
b["sources"][0]["sha256"] = "0" * 64
elif variant == "source_sha":
b["source_sha1"] = "0" * 40
elif variant == "path":
b["source_path"] = "forged"
elif variant == "layout":
ns[1]["pos"][0] += 1
elif variant == "dynamic":
ns[1]["inputs"][2]["name"] = "width"
elif variant == "fps_slot":
ns[7]["outputs"][2]["name"] = "audio"
> refuse(s, r)
calliope-backend/tests/test_rtx_video_fixed_document.py:159:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
s = {'id': 'e6b92a63-6d7e-4d2b-b9e3-2e054825db02', 'revision': 0, 'last_node_id': 14, 'last_link_id': 19, ...}
r = {'source_sha': '3a3b17a5bb55e250ed0430b9c2aeef396b7992c7', 'purpose': 'RTX 视频放大通过 GetVideoComponents 拆分视频,处理图像后重新 CreateVideo/SaveVideo。', 'instruction': '检查音轨是否接回 CreateVideo,避免只依据放大图像分支判断已保留音频。', 'reviewed_named_fields': [], ...}
def refuse(s, r):
r["fixed_version_document"]["canonical_sha256"] = hashlib.sha256(canonical(s)).hexdigest()
r["caller_digest"] = hashlib.sha256(canonical(r["fixed_version_document"])).hexdigest()
> assert not doc(s, r)["fixed_version"]["matched"]
E assert not True
calliope-backend/tests/test_rtx_video_fixed_document.py:42: AssertionError
__________ test_independent_inventory_edges_and_reference_conditions ___________
def test_independent_inventory_edges_and_reference_conditions():
ns = {n["id"]: n for n in SOURCE["nodes"]}
assert len(ns) == 5 and len(SOURCE["links"]) == 6
assert all(n["mode"] == 0 for n in ns.values())
assert ns[1]["widgets_values"] == ["scale by multiplier", 1, "ULTRA"]
assert type(ns[1]["widgets_values"][1]) is int
assert ns[7]["widgets_values"] == []
assert ns[8]["widgets_values"] == [30] and type(ns[8]["widgets_values"][0]) is int
assert ns[8]["properties"]["ue_properties"]["widget_ue_connectable"] == {"fps": True}
assert ns[6]["widgets_values"] == ["WanVideo_00003-audio.mp4", "image"]
assert ns[9]["widgets_values"] == ["video/ComfyUI", "auto", "auto"]
assert SOURCE["links"] == [
[5, 6, 0, 7, 0, "VIDEO"], [7, 1, 0, 8, 0, "IMAGE"],
[8, 7, 1, 8, 1, "AUDIO"], [9, 7, 2, 8, 2, "FLOAT"],
[10, 8, 0, 9, 0, "VIDEO"], [19, 7, 0, 1, 0, "IMAGE"],
]
for e, src, slot, dst, inp, _ in SOURCE["links"]:
assert e in ns[src]["outputs"][slot]["links"] and ns[dst]["inputs"][inp]["link"] == e
assert len(BLOCK["fields"]) == len({f["pointer"] for f in BLOCK["fields"]}) == 9
actual = {f"/nodes/{i}/widgets_values/{k}" for i,n in enumerate(SOURCE["nodes"]) for k in range(len(n["widgets_values"]))}
assert actual == {f["pointer"] for f in BLOCK["fields"]}
assert all(not isinstance(f["value"], (list, dict)) for f in BLOCK["fields"])
assert BLOCK["comments"] == [] and not doc()["source_notes"]
assert BLOCK["zero_saved_nodes"][0]["pointer"] == "/nodes/0/widgets_values"
assert BLOCK["counts"]["linked_saved_fields"] == 1
assert BLOCK["counts"]["frontend_only"] == 1
assert doc()["fixed_version"]["matched"] and not BLOCK["counts"]["final_prompt_constructed"]
assert doc()["dependencies"]["check_state"] == "unchecked"
assert doc()["status"] == dict(imported=True, doc_done=False, exec_verified=False)
for word in ["原音频", "round", "Git绑定未知", "MAX_PIXELS", "CUDA", "output", "UE7.7", "fps:true", "onAfterGraphConfigured", "千分率", "音画同步", "H264", "AAC", "9标量"]:
> assert word in " ".join(BLOCK["flow"])
E assert '音画同步' in '这张图把视频拆成画面、音频和帧率,只对画面做RTX超分,再接回原音频和FPS重组并保存。保存倍率为1、质量ULTRA;帧率缓存30被外线覆盖,实际FPS、音轨、同步、尺寸和画质均未核。UE7.7恢复次序及目标GPU/驱动/编解码器未知..."secondTabWidth": 65, "ue_properties": {"widget_ue_connectable": {}, "version": "7.7", "input_ue_unconnectable": {}}}}'
E + where '这张图把视频拆成画面、音频和帧率,只对画面做RTX超分,再接回原音频和FPS重组并保存。保存倍率为1、质量ULTRA;帧率缓存30被外线覆盖,实际FPS、音轨、同步、尺寸和画质均未核。UE7.7恢复次序及目标GPU/驱动/编解码器未知..."secondTabWidth": 65, "ue_properties": {"widget_ue_connectable": {}, "version": "7.7", "input_ue_unconnectable": {}}}}' = <built-in method join of str object at 0x56087de7fa00>(['这张图把视频拆成画面、音频和帧率,只对画面做RTX超分,再接回原音频和FPS重组并保存。保存倍率为1、质量ULTRA;帧率缓存30被外线覆盖,实际FPS、音轨、同步、尺寸和画质均未核。UE7.7恢复次序及目标GPU/驱动/编解码器未...存仅允许AUTO/MP4及AUTO/H264,实际实现h264/yuv420p并将帧率取整到千分率,有audio才按采样率/帧数切片后写AAC。不是保留原编码、时间戳或同步保证;实际时长、帧数、音轨/同步和编码器可用性未知。', ...])
E + where <built-in method join of str object at 0x56087de7fa00> = ' '.join
calliope-backend/tests/test_rtx_video_fixed_document.py:192: AssertionError
=============================== warnings summary ===============================
calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-f463f48e2488/workdir/aigc-home/calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53: DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead.
_PortalFactoryType = Callable[[], AbstractContextManager[anyio.abc.BlockingPortal]]
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED calliope-backend/tests/test_rtx_video_fixed_document.py::test_special_shapes_and_identity_fail_closed[empty]
FAILED calliope-backend/tests/test_rtx_video_fixed_document.py::test_independent_inventory_edges_and_reference_conditions
2 failed, 89 passed, 1 warning in 4.44s