swh_storage = <swh.storage.proxies.filter.FilteringProxyStorage object at 0x7f4cff60b4e0>
datadir = '/var/lib/jenkins/workspace/DLDHG/tests-on-diff/.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/tests/data'
tmp_path = PosixPath('/tmp/pytest-of-jenkins/pytest-0/test_old_loader_new_loader0')
def test_old_loader_new_loader(swh_storage, datadir, tmp_path):
archive_name = "example"
archive_path = os.path.join(datadir, f"{archive_name}.tgz")
repo_url = prepare_repository_from_archive(archive_path, archive_name, tmp_path)
repo_path = repo_url.replace("file://", "")
old_loader = HgBundle20Loader(swh_storage, repo_path)
assert old_loader.load() == {"status": "eventful"}
expected_stats = {
"content": 7,
"directory": 16,
"origin": 1,
"origin_visit": 1,
"release": 0,
"revision": 9,
"skipped_content": 0,
"snapshot": 1,
}
assert get_stats(old_loader.storage) == expected_stats
# Will pick up more branches, hence a different snapshot
loader = HgLoaderFromDisk(swh_storage, repo_path)
res = loader.load()
new_expected_stats = {
**expected_stats,
"origin_visit": 2,
"snapshot": 2,
}
> assert get_stats(loader.storage) == new_expected_stats
E AssertionError: assert {'content': 7...isit': 2, ...} == {'content': 7...isit': 2, ...}
E Omitting 7 identical items, use -vv to show
E Differing items:
E {'snapshot': 1} != {'snapshot': 2}
E Full diff:
E {
E 'content': 7,
E 'directory': 16,...
E
E ...Full output truncated (11 lines hidden), use '-vv' to show
.tox/py3/lib/python3.7/site-packages/swh/loader/mercurial/tests/test_from_disk.py:451: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Sep 6 2021, 1:30 PM