Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.loader.package.pypi.tests.test_pypi::test_pypi_artifact_to_revision_id_current_loader_version
Failed

TEST RESULT

Run At
Mar 23 2021, 1:25 PM
Details
def test_pypi_artifact_to_revision_id_current_loader_version(): """Current loader version should be able to solve current metadata scheme """ class artifact_metadata: sha256 = "6975816f2c5ad4046acc676ba112f2fff945b01522d63948531f11f11e0892ec" known_artifacts = { hash_to_bytes("b11ebac8c9d0c9e5063a2df693a18e3aba4b2f92"): { "original_artifact": [ { "checksums": { "sha256": "6975816f2c5ad4046acc676ba112f2fff945b01522d63948531f11f11e0892ec", # noqa }, } ], }, hash_to_bytes("845673bfe8cbd31b1eaf757745a964137e6f9116"): { "original_artifact": [{"checksums": {"sha256": "something-wrong"},}], }, } assert artifact_to_revision_id(known_artifacts, artifact_metadata) == hash_to_bytes( "b11ebac8c9d0c9e5063a2df693a18e3aba4b2f92" ) # there should not be more than one artifact with pytest.raises(ValueError): > PyPILoader.known_artifact_to_extid( { "original_artifact": [ {"checksums": {"sha256": artifact_metadata.sha256,},}, {"checksums": {"sha256": artifact_metadata.sha256,},}, ], } ) E AttributeError: type object 'PyPILoader' has no attribute 'known_artifact_to_extid' .tox/py3/lib/python3.7/site-packages/swh/loader/package/pypi/tests/test_pypi.py:872: AttributeError