68 lines
5.3 KiB
Plaintext
68 lines
5.3 KiB
Plaintext
........................................................................ [ 25%]
|
|
........................................................................ [ 50%]
|
|
........................................................................ [ 76%]
|
|
....................................................FF............. [100%]
|
|
=================================== FAILURES ===================================
|
|
___________________ test_independent_inventory_and_semantics ___________________
|
|
|
|
def test_independent_inventory_and_semantics():
|
|
assert len(SOURCE['nodes'])==5 and len(SOURCE['links'])==5
|
|
assert len(SUB['nodes'])==10 and len(SUB['links'])==28
|
|
assert all(n['mode']==0 for _,n in NODES)
|
|
actual={f'{prefix}/nodes/{i}/widgets_values/{k}' for prefix,g in SCOPES for i,n in enumerate(g['nodes']) if n['type']!='MarkdownNote' for k in range(len(n.get('widgets_values',[])))}
|
|
assert actual=={f['pointer'] for f in BLOCK['fields']} and len(actual)==37
|
|
assert len([f for f in BLOCK['fields'] if f['scope']=='root'])==15
|
|
assert sum(isinstance(f['value'],list) for f in BLOCK['fields'])==1
|
|
assert [n['id'] for _,n in NODES if 'widgets_values' not in n]==[50,58,61]
|
|
assert len(BLOCK['boundaries'])==13 and SUB['widgets']==[]
|
|
for b in BLOCK['boundaries']:
|
|
assert pointer(SOURCE,b['host_pointer'])['name']==pointer(SOURCE,b['definition_pointer'])['name']==b['name']
|
|
assert pointer(SOURCE,b['target_pointer'])['link']==b['edge']['id']
|
|
for prefix,g in SCOPES:
|
|
nodes={n['id']:n for n in g['nodes']}
|
|
for e in g['links']:
|
|
edge,src,slot,dst,inp,_=e if isinstance(e,list) else (e['id'],e['origin_id'],e['origin_slot'],e['target_id'],e['target_slot'],e['type'])
|
|
if src>=0: assert edge in nodes[src]['outputs'][slot]['links']
|
|
else: assert edge in g['inputs'][slot]['linkIds']
|
|
if dst>=0: assert nodes[dst]['inputs'][inp]['link']==edge
|
|
else: assert edge in g['outputs'][inp]['linkIds']
|
|
assert doc()['fixed_version']['matched'] and len(doc()['source_notes'])==1
|
|
assert BLOCK['comments'][0]['text']==SOURCE['nodes'][0]['widgets_values'][0]
|
|
assert doc()['dependencies']['check_state']=='unchecked' and doc()['status']==dict(imported=True,doc_done=False,exec_verified=False)
|
|
text=' '.join(BLOCK['flow'])
|
|
for word in ['13宿主输入','SaveImage有IMAGE出口','未显式result','不借新版本','seedvr2_ema_vae_fp16','fixed','guhaiImageValue','previewExposures','4096','未实跑']:
|
|
> assert word in text
|
|
E assert '未显式result' in '这张图读取一张图片及遮罩,送入子图做缩放、编码、采样和解码,再保存并比较处理结果。保存倍率4、lanczos插值;比较A来自子图,B来自保存节点,不能当成原图与放大图对比。准确core支持SaveImage图像出口,但三类SeedVR... 12, "target_id": 48, "target_slot": 4, "type": "INT"}, "target_pointer": "/definitions/subgraphs/0/nodes/9/inputs/4"}'
|
|
|
|
calliope-backend/tests/test_seedvr2_fixed_document.py:134: AssertionError
|
|
_______________ test_old_thirty_review_objects_exactly_preserved _______________
|
|
|
|
def test_old_thirty_review_objects_exactly_preserved():
|
|
resource='calliope-backend/src/calliope/comfyui/source_reviews.json'
|
|
old=json.loads(subprocess.check_output(['git','show','1d04c00:'+resource],cwd=REPO)); now=json.loads((REPO/resource).read_bytes()); now[PATH].pop('fixed_version_document')
|
|
assert now==old and len(DEFINITIONS)==31
|
|
blocks=[r['fixed_version_document'] for r in old.values() if 'fixed_version_document' in r]
|
|
> assert len(blocks)==30 and sum(len(b['fields']) for b in blocks)==904 and sum(len(b['comments']) for b in blocks)==21
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
calliope-backend/tests/test_seedvr2_fixed_document.py:142:
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
.0 = <list_iterator object at 0x7fa1480ef910>
|
|
|
|
> assert len(blocks)==30 and sum(len(b['fields']) for b in blocks)==904 and sum(len(b['comments']) for b in blocks)==21
|
|
^^^^^^^^^^^^^
|
|
E KeyError: 'comments'
|
|
|
|
calliope-backend/tests/test_seedvr2_fixed_document.py:142: KeyError
|
|
=============================== warnings summary ===============================
|
|
calliope-backend/.venv/lib/python3.11/site-packages/starlette/testclient.py:53
|
|
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-d1175e415253/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_seedvr2_fixed_document.py::test_independent_inventory_and_semantics
|
|
FAILED calliope-backend/tests/test_seedvr2_fixed_document.py::test_old_thirty_review_objects_exactly_preserved
|
|
2 failed, 281 passed, 1 warning in 4.82s
|