Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/mercurial/tests/test_from_bundle.py
- This file was copied from swh/loader/mercurial/tests/test_loader.py.
Show All 15 Lines | from swh.loader.tests import ( | ||||
check_snapshot, | check_snapshot, | ||||
get_stats, | get_stats, | ||||
prepare_repository_from_archive, | prepare_repository_from_archive, | ||||
) | ) | ||||
from swh.model.hashutil import hash_to_bytes | from swh.model.hashutil import hash_to_bytes | ||||
from swh.model.model import RevisionType, Snapshot, SnapshotBranch, TargetType | from swh.model.model import RevisionType, Snapshot, SnapshotBranch, TargetType | ||||
from swh.storage.algos.snapshot import snapshot_get_latest | from swh.storage.algos.snapshot import snapshot_get_latest | ||||
from ..loader import CloneTimeoutError, HgArchiveBundle20Loader, HgBundle20Loader | from ..from_bundle import CloneTimeoutError, HgArchiveBundle20Loader, HgBundle20Loader | ||||
from .loader_checker import ExpectedSwhids, LoaderChecker | from .loader_checker import ExpectedSwhids, LoaderChecker | ||||
def test_examples(swh_config, datadir, tmp_path): | def test_examples(swh_config, datadir, tmp_path): | ||||
for archive_name in ("hello", "transplant", "the-sandbox", "example"): | for archive_name in ("hello", "transplant", "the-sandbox", "example"): | ||||
archive_path = os.path.join(datadir, f"{archive_name}.tgz") | archive_path = os.path.join(datadir, f"{archive_name}.tgz") | ||||
json_path = os.path.join(datadir, f"{archive_name}.json") | json_path = os.path.join(datadir, f"{archive_name}.json") | ||||
repo_url = prepare_repository_from_archive(archive_path, archive_name, tmp_path) | repo_url = prepare_repository_from_archive(archive_path, archive_name, tmp_path) | ||||
▲ Show 20 Lines • Show All 278 Lines • Show Last 20 Lines |