self = <swh.storage.tests.test_storage.TestStorageGeneratedData object at 0x7fc5207e9e10>
swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7fc5207e9d68>
sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fc48f48f6d8>
def test_origin_count_with_visit_no_visits(self, swh_storage, sample_data):
swh_storage.origin_add(sample_data.origins)
# none of them have visits, so with_visit=True => 0
> assert swh_storage.origin_count("github", with_visit=True) == 0
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/test_storage.py:4028:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <swh.storage.in_memory.InMemoryStorage object at 0x7fc5207e9d68>
url_pattern = 'github', regexp = False, with_visit = True
def origin_count(self, url_pattern, regexp=False, with_visit=False):
return len(
self.origin_search(
url_pattern,
regexp=regexp,
with_visit=with_visit,
> limit=len(self._origins),
)
)
E TypeError: object of type 'PagedResult' has no len()
.tox/py3/lib/python3.7/site-packages/swh/storage/in_memory.py:763: TypeError
TEST RESULT
TEST RESULT
- Run At
- Jul 30 2020, 4:17 PM