archive_data = <swh.web.tests.conftest._ArchiveData object at 0x7fef4aeb26d8>
@given(revision())
> def test_lookup_snapshot_sizes_with_filtering(archive_data, revision):
.tox/py3/lib/python3.7/site-packages/swh/web/tests/common/test_archive.py:1055:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/web/tests/common/test_archive.py:1077: in test_lookup_snapshot_sizes_with_filtering
assert (
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
snapshot_id = '606f8efd338651d48156aa2f0d5f8d8a6f31f755'
branch_name_exclude_prefix = 'refs/pull/'
def lookup_snapshot_sizes(
snapshot_id: str, branch_name_exclude_prefix: Optional[str] = None
) -> Dict[str, int]:
"""Count the number of branches in the snapshot with the given id
Args:
snapshot_id (str): sha1 identifier of the snapshot
Returns:
dict: A dict whose keys are the target types of branches and
values their corresponding amount
"""
snapshot_id_bin = _to_sha1_bin(snapshot_id)
snapshot_sizes = dict.fromkeys(("alias", "release", "revision"), 0)
branch_counts = storage.snapshot_count_branches(
snapshot_id_bin,
> branch_name_exclude_prefix.encode() if branch_name_exclude_prefix else None,
)
E TypeError: snapshot_count_branches() takes 2 positional arguments but 3 were given
.tox/py3/lib/python3.7/site-packages/swh/web/common/archive.py:1042: TypeError
TEST RESULT
TEST RESULT
- Run At
- Mar 8 2021, 11:23 AM