Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Oct 6 2020, 1:33 PM
Details
self = <swh.indexer.tests.test_fossology_license.TestFossologyLicensePartitionIndexer testMethod=test_generate_content_get_no_result> def test_generate_content_get_no_result(self): """No result indexed returns False""" > actual_results = self.indexer.run(0, 0, incremental=False) .tox/py3/lib/python3.7/site-packages/swh/indexer/tests/utils.py:762: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/indexer/indexer.py:476: in run for contents in utils.grouper(gen, n=self.config["write_batch_size"]): .tox/py3/lib/python3.7/site-packages/swh/core/utils.py:47: in grouper for _data in itertools.zip_longest(*args, fillvalue=stop_value): .tox/py3/lib/python3.7/site-packages/swh/indexer/indexer.py:432: in _index_with_skipping_already_done partition_id, nb_partitions, page_token=next_page_token .tox/py3/lib/python3.7/site-packages/swh/indexer/fossology_license.py:186: in indexed_contents_in_partition self.tool["id"], partition_id, nb_partitions, page_token=page_token .tox/py3/lib/python3.7/site-packages/swh/indexer/storage/in_memory.py:390: in content_fossology_license_get_partition indexer_configuration_id, partition_id, nb_partitions, page_token, limit .tox/py3/lib/python3.7/site-packages/swh/indexer/storage/in_memory.py:168: in get_partition partition_id, nb_partitions, SHA1_SIZE _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ i = 0, n = 0, nb_bytes = 20 def get_partition_bounds_bytes( i: int, n: int, nb_bytes: int ) -> Tuple[bytes, Optional[bytes]]: r"""Splits the range [0; 2^(nb_bytes*8)) into n same-length intervals, and returns the boundaries of this interval (both inclusive); or None as upper bound, if this is the last partition n must be a power of 2. >>> get_partition_bounds_bytes(0, 16, 2) == (b'\x00\x00', b'\x10\x00') True >>> get_partition_bounds_bytes(1, 16, 2) == (b'\x10\x00', b'\x20\x00') True >>> get_partition_bounds_bytes(14, 16, 2) == (b'\xe0\x00', b'\xf0\x00') True >>> get_partition_bounds_bytes(15, 16, 2) == (b'\xf0\x00', None) True """ if not _is_power_of_two(n): > raise ValueError("number of partitions must be a power of two") E ValueError: number of partitions must be a power of two .tox/py3/lib/python3.7/site-packages/swh/storage/utils.py:51: ValueError