Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/tests/test_provenance_storage.py
# Copyright (C) 2021-2022 The Software Heritage developers | # Copyright (C) 2021-2022 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from datetime import datetime, timezone | from datetime import datetime, timezone | ||||
import inspect | import inspect | ||||
import os | import os | ||||
from typing import Any, Dict, Iterable, Optional, Set, Tuple | from typing import Any, Dict, Iterable, Optional, Set, Tuple | ||||
import pytest | import pytest | ||||
from swh.model.hashutil import hash_to_bytes | from swh.model.hashutil import hash_to_bytes | ||||
from swh.model.model import Origin, Sha1Git | from swh.model.model import Origin, Sha1Git | ||||
from swh.provenance.algos.origin import origin_add | |||||
from swh.provenance.algos.revision import revision_add | |||||
from swh.provenance.archive import ArchiveInterface | from swh.provenance.archive import ArchiveInterface | ||||
from swh.provenance.interface import ProvenanceInterface | from swh.provenance.interface import ProvenanceInterface | ||||
from swh.provenance.model import OriginEntry, RevisionEntry | from swh.provenance.model import OriginEntry, RevisionEntry | ||||
from swh.provenance.origin import origin_add | |||||
from swh.provenance.provenance import Provenance | from swh.provenance.provenance import Provenance | ||||
from swh.provenance.revision import revision_add | |||||
from swh.provenance.storage.interface import ( | from swh.provenance.storage.interface import ( | ||||
DirectoryData, | DirectoryData, | ||||
EntityType, | EntityType, | ||||
ProvenanceResult, | ProvenanceResult, | ||||
ProvenanceStorageInterface, | ProvenanceStorageInterface, | ||||
RelationData, | RelationData, | ||||
RelationType, | RelationType, | ||||
RevisionData, | RevisionData, | ||||
▲ Show 20 Lines • Show All 493 Lines • Show Last 20 Lines |