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, 5:36 PM
Details
content = {'blake2s256': 'bbfdcf926549282f462b9afea6514962b8716d305d47e2238ab0cb5e84bed86f', 'data': '{\n "name": "highlightjs-...e": "http://wcoder.github.io/highlightjs-line-numbers.js/"\n}\n', 'encoding': 'us-ascii', 'hljs_language': 'json', ...} directory = 'c012019a398b51b12ff51d22349fd06e23ed9a23' 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 assert {<ObjectType....9f\x1f'], ...} == {<ObjectType....f3mfU\'\x89'}} E Differing items: E {<ObjectType.SNAPSHOT: 'snp'>: [b'\n\xd7\xae]\x13\xfd"\xecu\x860m#\x86\xf3mfU\'\x89']} != {<ObjectType.SNAPSHOT: 'snp'>: {b'\n\xd7\xae]\x13\xfd"\xecu\x860m#\x86\xf3mfU\'\x89'}} E {<ObjectType.RELEASE: 'rel'>: [b']\xa6Q\xe6\xe6j\xfft\xd7\x13\xfb\xb76\x9dl\xc0"g\x9f\x1f']} != {<ObjectType.RELEASE: 'rel'>: {b']\xa6Q\xe6\xe6j\xfft\xd7\x13\xfb\xb76\x9dl\xc0"g\x9f\x1f'}} E {<ObjectType.REVISION: 'rev'>: [b'<7\xcf\xdf5\xe5\x1a\xcf\xa8"\xab`R\xc6\xc98\x10do\xf4']} != {<ObjectType.REVISION: 'rev'>: {b'<7\xcf\xdf5\xe5\x1a\xcf\xa8"\xab`R\xc6\xc98\x10do\xf4'}} E Left contain... E E ...Full output truncated (32 lines hidden), use '-vv' to show .tox/py3/lib/python3.7/site-packages/swh/web/tests/common/test_archive.py:984: AssertionError