Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/tests/__init__.py
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | assert ( | ||||
visit_status.status == status | visit_status.status == status | ||||
), f"Visit_status has status {visit_status.status} instead of {status}" | ), f"Visit_status has status {visit_status.status} instead of {status}" | ||||
if snapshot is not None: | if snapshot is not None: | ||||
assert visit_status.snapshot is not None | assert visit_status.snapshot is not None | ||||
assert visit_status.snapshot == snapshot, ( | assert visit_status.snapshot == snapshot, ( | ||||
f"Visit_status points to snapshot {visit_status.snapshot.hex()} " | f"Visit_status points to snapshot {visit_status.snapshot.hex()} " | ||||
f"instead of {snapshot.hex()}" | f"instead of {snapshot.hex()}" | ||||
) | ) | ||||
return visit_status | return visit_status | ||||
def prepare_repository_from_archive( | def prepare_repository_from_archive( | ||||
archive_path: str, | archive_path: str, | ||||
filename: Optional[str] = None, | filename: Optional[str] = None, | ||||
tmp_path: Union[PosixPath, str] = "/tmp", | tmp_path: Union[PosixPath, str] = "/tmp", | ||||
) -> str: | ) -> str: | ||||
▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines |