Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.fuse.tests.test_revision::test_list_history
Failed

TEST RESULT

Run At
Nov 24 2020, 10:41 AM
Details
fuse_mntdir = PosixPath('/tmp/tmpfyy0sgx2.swh-fuse-test') def test_list_history(fuse_mntdir): dir_path = fuse_mntdir / "archive" / REV_SMALL_HISTORY / "history" assert os.listdir(dir_path) == ["by-date", "by-hash", "by-page"] history_meta = get_data_from_graph_archive( REV_SMALL_HISTORY, GRAPH_API_REQUEST.HISTORY ) history = history_meta.strip() # Only keep second node in the edge because first node is redundant # information or the root node (hence not an ancestor) expected = set( map(parse_swhid, [edge.split(" ")[1] for edge in history.split("\n")]) ) dir_by_hash = dir_path / "by-hash" for swhid in expected: depth1 = swhid.object_id[:2] depth2 = str(swhid) assert (dir_by_hash / depth1).exists() assert depth2 in (os.listdir(dir_by_hash / depth1)) dir_by_page = dir_path / "by-page" for idx, swhid in enumerate(expected): page_number = idx // RevisionHistoryShardByPage.PAGE_SIZE depth1 = RevisionHistoryShardByPage.PAGE_FMT.format(page_number=page_number) depth2 = str(swhid) assert (dir_by_page / depth1).exists() assert depth2 in (os.listdir(dir_by_page / depth1)) dir_by_date = dir_path / "by-date" # Wait max 1 second to populate by-date/ dir for i in range(100): if ".status" not in os.listdir(dir_by_date): break time.sleep(0.01) for swhid in expected: meta = get_data_from_web_archive(str(swhid)) date = dateutil.parser.parse(meta["date"]) depth1 = RevisionHistoryShardByDate.DATE_FMT.format( year=date.year, month=date.month, day=date.day ) depth2 = str(swhid) > assert (dir_by_date / depth1).exists() E AssertionError: assert False E + where False = <bound method Path.exists of PosixPath('/tmp/tmpfyy0sgx2.swh-fuse-test/archive/swh:1:rev:37426e42cf78a43779312d780eecb21a64006d99/history/by-date/2010/06/24')>() E + where <bound method Path.exists of PosixPath('/tmp/tmpfyy0sgx2.swh-fuse-test/archive/swh:1:rev:37426e42cf78a43779312d780eecb21a64006d99/history/by-date/2010/06/24')> = (PosixPath('/tmp/tmpfyy0sgx2.swh-fuse-test/archive/swh:1:rev:37426e42cf78a43779312d780eecb21a64006d99/history/by-date') / '2010/06/24/').exists .tox/py3/lib/python3.7/site-packages/swh/fuse/tests/test_revision.py:87: AssertionError