Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ lint = "pre-commit run --all-files --color=always {args}"
[tool.hatch.envs.hatch-test]
# Ref: https://hatch.pypa.io/latest/config/internal/testing/
extra-dependencies = [
"pytest-recording~=0.13"
"pytest-recording~=0.13",
"pytest-github-actions-annotate-failures~=0.3"
]
randomize = true # run tests in random order

Expand Down
3 changes: 0 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ def temporary_data_directory(tmp_path):
def preprocessor(test_config) -> Preprocessor:
YAML_DIR = test_config["SERVICE"]["yaml_directory"]
METRIC_YML_PATH = SRC_DIR.joinpath(YAML_DIR)
LOV_API = test_config["EXTERNAL"]["lov_api"]
LOD_CLOUDNET = test_config["EXTERNAL"]["lod_cloudnet"]

preprocessor = Preprocessor()

Expand All @@ -84,7 +82,6 @@ def preprocessor(test_config) -> Preprocessor:
preprocessor.retrieve_datacite_re3repos()

preprocessor.retrieve_metadata_standards()
preprocessor.retrieve_linkedvocabs(lov_api=LOV_API, lodcloud_api=LOD_CLOUDNET, isDebugMode=isDebug)
preprocessor.retrieve_default_namespaces()
preprocessor.set_remote_log_info(
test_config["SERVICE"]["remote_log_host"],
Expand Down
23 changes: 0 additions & 23 deletions tests/helper/test_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ def repodois():
return load_yaml_from_data_directory("repodois.yaml")


@pytest.fixture(scope="session")
def metadata_standards_uris():
return load_yaml_from_data_directory("metadata_standards_uris.yaml")


@pytest.fixture(scope="session")
def linked_vocab():
return load_yaml_from_data_directory("linked_vocab.yaml")
Expand Down Expand Up @@ -147,17 +142,6 @@ def test_retrieve_datacite_re3repos(temporary_preprocessor: Preprocessor, repodo
assert len(temporary_preprocessor.re3repositories) == expected


def test_retrieve_linkedvocabs(
temporary_preprocessor: Preprocessor, test_config: dict, linked_vocab: list[dict[str, str]]
) -> None:
LOV_API = test_config["EXTERNAL"]["lov_api"]
LOD_CLOUDNET = test_config["EXTERNAL"]["lod_cloudnet"]
assert not temporary_preprocessor.linked_vocabs
temporary_preprocessor.retrieve_linkedvocabs(lov_api=LOV_API, lodcloud_api=LOD_CLOUDNET, isDebugMode=isDebug)
expected = len(linked_vocab)
assert len(temporary_preprocessor.linked_vocabs) == expected


def test_retrieve_default_namespaces(temporary_preprocessor: Preprocessor, default_namespaces) -> None:
assert not temporary_preprocessor.default_namespaces
temporary_preprocessor.retrieve_default_namespaces()
Expand Down Expand Up @@ -194,13 +178,6 @@ def test_get_metadata_standards(temporary_preprocessor: Preprocessor, metadata_s
assert temporary_preprocessor.metadata_standards == metadata_standards


def test_get_metadata_standards_uris(temporary_preprocessor: Preprocessor, metadata_standards_uris):
assert not temporary_preprocessor.metadata_standards_uris
result = temporary_preprocessor.get_metadata_standards_uris()
assert result == metadata_standards_uris
assert temporary_preprocessor.metadata_standards_uris == metadata_standards_uris


def test_get_schema_org_context(temporary_preprocessor: Preprocessor):
assert not temporary_preprocessor.schema_org_context
result = temporary_preprocessor.get_schema_org_context()
Expand Down
Loading