48 lines
2.6 KiB
Plaintext
48 lines
2.6 KiB
Plaintext
........................................................................ [ 38%]
|
|
........................................................................ [ 76%]
|
|
...............................F............. [100%]
|
|
=================================== FAILURES ===================================
|
|
_______________ test_old_reviews_and_qualification_are_unchanged _______________
|
|
|
|
def test_old_reviews_and_qualification_are_unchanged():
|
|
import subprocess
|
|
|
|
name = "calliope-backend/src/calliope/comfyui/source_reviews.json"
|
|
previous = json.loads(
|
|
subprocess.check_output(
|
|
["git", "show", "5d688a1d3022844119bf9e61f773907c4affc088:" + name], cwd=REPO
|
|
)
|
|
)
|
|
current = json.loads((REPO / name).read_bytes())
|
|
for path, review in previous.items():
|
|
if path != PATH:
|
|
assert current[path] == review
|
|
else:
|
|
current_without = dict(current[path])
|
|
current_without.pop("fixed_version_document")
|
|
assert current_without == review
|
|
old = [r["fixed_version_document"] for r in previous.values() if "fixed_version_document" in r]
|
|
assert len(old) == 87 and sum(len(b["fields"]) for b in old) == 4537
|
|
> assert sum(len(b["comments"]) for b in old) == 138
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
calliope-backend/tests/test_krea_identity_fixed_document.py:183:
|
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
|
|
|
|
.0 = <list_iterator object at 0x7f89c72b6440>
|
|
|
|
> assert sum(len(b["comments"]) for b in old) == 138
|
|
^^^^^^^^^^^^^
|
|
E KeyError: 'comments'
|
|
|
|
calliope-backend/tests/test_krea_identity_fixed_document.py:183: KeyError
|
|
=============================== warnings summary ===============================
|
|
calliope-backend/.venv/lib/python3.12/site-packages/starlette/testclient.py:53
|
|
/home/xiaomo/multica_workspaces/hello-af23464d222e/hel-892-8d94b12fc336/workdir/aigc-home/calliope-backend/.venv/lib/python3.12/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_krea_identity_fixed_document.py::test_old_reviews_and_qualification_are_unchanged
|
|
1 failed, 188 passed, 1 warning in 5.79s
|