Page MenuHomeSoftware Heritage

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

TEST RESULT

Run At
Aug 12 2021, 12:13 PM
Details
swh_storage = <swh.storage.proxies.retry.RetryingProxyStorage object at 0x7ffaa674d630> requests_mock_datadir = <requests_mock.mocker.Mocker object at 0x7ffaa853ceb8> def test_pypi_fail__load_snapshot(swh_storage, requests_mock_datadir): """problem during loading: {visit: failed, status: failed, no snapshot} """ url = "https://pypi.org/project/0805nexter" with patch( "swh.loader.package.pypi.loader.PyPILoader._load_snapshot", side_effect=ValueError("Fake problem to fail visit"), ): loader = PyPILoader(swh_storage, url) actual_load_status = loader.load() assert actual_load_status == {"status": "failed"} stats = get_stats(loader.storage) > assert { "content": 6, "directory": 4, "origin": 1, "origin_visit": 1, "release": 0, "revision": 2, "skipped_content": 0, "snapshot": 0, } == stats E AssertionError: assert {'content': 6...isit': 1, ...} == {'content': 0...isit': 1, ...} E Omitting 5 identical items, use -vv to show E Differing items: E {'directory': 4} != {'directory': 0} E {'content': 6} != {'content': 0} E {'revision': 2} != {'revision': 0} E Full diff: E {... E E ...Full output truncated (19 lines hidden), use '-vv' to show .tox/py3/lib/python3.7/site-packages/swh/loader/package/pypi/tests/test_pypi.py:256: AssertionError