Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.indexer.tests.test_fossology_license.TestFossologyLicensePartitionIndexer::test__index_contents
Failed

TEST RESULT

Run At
Aug 6 2020, 9:52 AM
Details
self = <swh.indexer.tests.test_fossology_license.TestFossologyLicensePartitionIndexer testMethod=test__index_contents> def test__index_contents(self): """Indexing contents without existing data results in indexed data """ _start, _end = [self.contents[0], self.contents[2]] # output hex ids start, end = map(hashutil.hash_to_bytes, (_start, _end)) # given > actual_results = list(self.indexer._index_contents(start, end, indexed={})) .tox/py3/lib/python3.7/site-packages/swh/indexer/tests/utils.py:710: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/indexer/indexer.py:429: in _index_contents for sha1 in self._list_contents_to_index(partition_id, nb_partitions, indexed): _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <swh.indexer.fossology_license.FossologyLicensePartitionIndexer object at 0x7fe6219633c8> partition_id = b'\x01\xc97\x9d\xfc3\x809c\xd0|\x1c\xcct\x8d?\xe4\xc9k\xb5' nb_partitions = b'\x10;\xc0\x87\xdb\x1d&\xaf\xc3\xa0(?8f=\x08\x1e\x9b\x01\xe6' indexed = {} def _list_contents_to_index( self, partition_id: int, nb_partitions: int, indexed: Set[Sha1] ) -> Iterator[Sha1]: """Compute from storage the new contents to index in the range [start, end]. The already indexed contents are skipped. Args: partition_id: Index of the partition to fetch data from nb_partitions: Total number of partition indexed: Set of content already indexed. Yields: Identifier as bytes of contents to index """ if not isinstance(partition_id, int) or not isinstance(nb_partitions, int): raise TypeError( > f"identifiers must be int, not {partition_id!r} and {nb_partitions!r}." ) E TypeError: identifiers must be int, not b'\x01\xc97\x9d\xfc3\x809c\xd0|\x1c\xcct\x8d?\xe4\xc9k\xb5' and b'\x10;\xc0\x87\xdb\x1d&\xaf\xc3\xa0(?8f=\x08\x1e\x9b\x01\xe6'. .tox/py3/lib/python3.7/site-packages/swh/indexer/indexer.py:398: TypeError