Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_in_memory.TestInMemoryStorage::test_extid_add_hg
Failed

TEST RESULT

Run At
Apr 22 2021, 8:33 PM
Details
self = <swh.storage.tests.test_in_memory.TestInMemoryStorage object at 0x7fb612cfbe10> swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7fb612cfbac8> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb612cfbcc0> def test_extid_add_hg(self, swh_storage, sample_data): def get_node(revision): node = None if revision.extra_headers: node = dict(revision.extra_headers).get(b"node") if node is None and revision.metadata: node = hash_to_bytes(revision.metadata.get("node")) return node swhids = [ revision.id for revision in sample_data.revisions if revision.type.value == "hg" ] extids = [ get_node(revision) for revision in sample_data.revisions if revision.type.value == "hg" ] assert swh_storage.extid_get_from_extid("hg", extids) == [] assert swh_storage.extid_get_from_target(ObjectType.REVISION, swhids) == [] extid_objs = [ ExtID( extid=hgid, extid_type="hg", target=CoreSWHID(object_id=swhid, object_type=ObjectType.REVISION,), ) for hgid, swhid in zip(extids, swhids) ] > summary = swh_storage.extid_add(extid_objs) .tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:1153: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.storage.in_memory.InMemoryStorage object at 0x7fb612cfbac8> ids = [ExtID(extid_type='hg', extid=b'\xa3\x16\xdf\xb44\xaf+E\x1c\x1f94\x96\xb7\xea\xed\xa3C\xf5C', target=CoreSWHID(namespa...9bi', object_type=<ObjectType.REVISION: 'rev'>), id=b'X\xe0\xa4U\x85\xde\xfenCB\x07\xf9\xc9\xf2\xd2q\xfc\xb5\x9b\xe7')] def extid_add(self, ids: List[ExtID]) -> Dict[str, int]: > if self._check_missing: E AttributeError: 'InMemoryStorage' object has no attribute '_check_missing' .tox/py3/lib/python3.7/site-packages/swh/storage/cassandra/storage.py:1386: AttributeError