Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.common.test_archive::Tests / Python tests / test_lookup_missing_hashes_some_present
Failed

TEST RESULT

Run At
May 6 2022, 7:21 PM
Details
content = {'blake2s256': 'a14f3353749bc6488a6ea7a68c708eb7d3f2a5ee2228c83c29fc2bd704623947', 'data': '# highlightjs-line-numbers...ions);\n```\n\n---\n&copy; 2017 Yauheni Pakala | MIT License\n', 'encoding': 'utf-8', 'hljs_language': 'markdown', ...} directory = '21b22ceb3d68b8981ccbfbbefaf70f6912d340e5' def test_lookup_missing_hashes_some_present(content, directory): missing_rev = random_sha1_bytes() missing_rel = random_sha1_bytes() missing_snp = random_sha1_bytes() grouped_swhids = { ObjectType.CONTENT: [hash_to_bytes(content["sha1_git"])], ObjectType.DIRECTORY: [hash_to_bytes(directory)], ObjectType.REVISION: [missing_rev], ObjectType.RELEASE: [missing_rel], ObjectType.SNAPSHOT: [missing_snp], } actual_result = archive.lookup_missing_hashes(grouped_swhids) > assert actual_result == { ObjectType.REVISION: {missing_rev}, ObjectType.RELEASE: {missing_rel}, ObjectType.SNAPSHOT: {missing_snp}, } E AssertionError: assert {<ObjectType....17\x9c'}, ...} == {<ObjectType....xd9k\x15{:`'}} E Omitting 3 identical items, use -vv to show E Left contains 2 more items: E {<ObjectType.CONTENT: 'cnt'>: set(), <ObjectType.DIRECTORY: 'dir'>: set()} E Full diff: E { E + <ObjectType.CONTENT: 'cnt'>: set(), E + <ObjectType.DIRECTORY: 'dir'>: set(),... E E ...Full output truncated (8 lines hidden), use '-vv' to show .tox/py3/lib/python3.7/site-packages/swh/web/tests/common/test_archive.py:984: AssertionError