........................................................................ [  4%]
........................................................................ [  8%]
........................................................................ [ 12%]
........................................................................ [ 16%]
........................................................................ [ 21%]
........................................................................ [ 25%]
........................................................................ [ 29%]
........................................................................ [ 33%]
........................................................................ [ 37%]
........................................................................ [ 42%]
........................................................................ [ 46%]
........................................................................ [ 50%]
........................................................................ [ 54%]
........................................................................ [ 58%]
........................................................................ [ 63%]
........................................................................ [ 67%]
........................................................................ [ 71%]
........................................................................ [ 75%]
........................................................................ [ 80%]
........................................................................ [ 84%]
........................................................................ [ 88%]
...F.................................................................... [ 92%]
........................................................................ [ 96%]
.....................................................                    [100%]
=================================== FAILURES ===================================
__________ test_exact_topology_counts_modes_unknowns_and_old_objects ___________

    def test_exact_topology_counts_modes_unknowns_and_old_objects():
        d = doc()
        assert d["fixed_version"]["matched"] and d["fixed_version"]["fields"] == BLOCK["fields"]
        assert len(BLOCK["fields"]) == 74 and len(BLOCK["comments"]) == 0
        assert sum(isinstance(f["value"], dict) for f in BLOCK["fields"]) == 3
        assert sum(f["value"] is None for f in BLOCK["fields"]) == 1
        assert sum(f["role"] == "unknown_saved" for f in BLOCK["fields"]) == 7
        expected = {
            203: 1,
            334: 1,
            340: 1,
            137: 11,
            339: 1,
            373: 11,
            364: 3,
            362: 7,
            363: 0,
            106: 2,
            374: 9,
            370: 1,
            130: 9,
            208: 1,
            376: 1,
            375: 9,
            365: 0,
            335: 2,
            372: 4,
        }
        nodes = {n["id"]: n for n in SOURCE["nodes"]}
        assert {nid: len(n["widgets_values"]) for nid, n in nodes.items()} == expected
        assert {nid for nid, n in nodes.items() if n["mode"] == 4} == {106, 375, 365}
        assert len(SOURCE["links"]) == 22 and "definitions" not in SOURCE
        assert [e[0] for e in SOURCE["links"]] == [
            570,
            621,
            623,
            624,
            625,
            627,
            629,
            648,
            650,
            651,
            653,
            654,
            655,
            656,
            657,
            658,
            659,
            660,
            661,
            662,
            663,
            665,
        ]
        for eid, origin, slot, target, inp, typ in SOURCE["links"]:
            assert eid in nodes[origin]["outputs"][slot]["links"]
            assert nodes[target]["inputs"][inp]["link"] == eid
            assert nodes[target]["inputs"][inp]["type"] == (
                {648: "INT", 661: "INT,FLOAT", 662: "INT,FLOAT"}.get(eid, typ)
            )
        text = "".join(BLOCK["flow"])
>       assert all(
            t in text
            for t in [
                "没有warmup",
                "没有per_batch",
                "round(result)",
                "音频未接",
                "临时目录",
                "UE",
                "mode4",
                "0新源注释",
                "版本矛盾",
                "taichi",
                "提供方",
                "未实跑",
            ]
        )
E       assert False
E        +  where False = all(<generator object test_exact_topology_counts_modes_unknowns_and_old_objects.<locals>.<genexpr> at 0x7f157c826180>)

calliope-backend/tests/test_nlf_fixed_document.py:242: AssertionError
=========================== short test summary info ============================
FAILED calliope-backend/tests/test_nlf_fixed_document.py::test_exact_topology_counts_modes_unknowns_and_old_objects
1 failed, 1708 passed, 1 warning in 5.18s
