Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/tests/test_origin_revision_layer.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 | ||||
import re | import re | ||||
from typing import Any, Dict, Iterable, Iterator, List, Set | from typing import Any, Dict, Iterable, Iterator, List, Set | ||||
import pytest | import pytest | ||||
from typing_extensions import TypedDict | from typing_extensions import TypedDict | ||||
from swh.model.hashutil import hash_to_bytes | from swh.model.hashutil import hash_to_bytes | ||||
from swh.model.model import Sha1Git | from swh.model.model import Sha1Git | ||||
from swh.provenance.algos.origin import origin_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 | from swh.provenance.model import OriginEntry | ||||
from swh.provenance.origin import origin_add | |||||
from swh.provenance.storage.interface import EntityType, RelationType | from swh.provenance.storage.interface import EntityType, RelationType | ||||
from swh.provenance.tests.conftest import fill_storage, get_datafile, load_repo_data | from swh.provenance.tests.conftest import fill_storage, get_datafile, load_repo_data | ||||
class SynthRelation(TypedDict): | class SynthRelation(TypedDict): | ||||
src: Sha1Git | src: Sha1Git | ||||
dst: Sha1Git | dst: Sha1Git | ||||
name: str | name: str | ||||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |