self = <swh.storage.tests.test_storage.TestStorage object at 0x7f4a385e3f98>
swh_storage = <swh.storage.storage.Storage object at 0x7f4a397b8b70>
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7f4a385ca908>
def test_revision_log(self, swh_storage, sample_data):
revision1, revision2, revision3, revision4 = sample_data.revisions[:4]
# rev4 -is-child-of-> rev3 -> rev1, (rev2 -> rev1)
swh_storage.revision_add([revision1, revision2, revision3, revision4])
# when
> results = list(swh_storage.revision_log([revision4.id]))
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:942:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/core/db/common.py:97: in _meth
yield from meth(self, *args, db=db, cur=cur, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.storage.Storage object at 0x7f4a397b8b70>
revisions = [b'\x88\xcdQ&\xfc\x95\x8e\xd7\x00\x89\xd54\x04A\xa1\xc2G{\xcc ']
limit = None, db = <swh.storage.db.Db object at 0x7f4a385caf28>
cur = <cursor object at 0x7f4c1038ace0; closed: -1>
@timed
@db_transaction_generator(statement_timeout=2000)
def revision_log(
self, revisions: List[Sha1Git], limit: Optional[int] = None, db=None, cur=None
) -> Iterable[Optional[Dict[str, Any]]]:
for line in db.revision_log(revisions, limit, cur):
data = converters.db_to_revision(dict(zip(db.revision_get_cols, line)))
> if not line["type"]:
E TypeError: tuple indices must be integers or slices, not str
.tox/py3/lib/python3.7/site-packages/swh/storage/storage.py:635: TypeError
TEST RESULT
TEST RESULT
- Run At
- Aug 5 2020, 9:41 AM