mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-08-20 15:27:26 +00:00
* migrate to hatch * reorder tests * generic fixtures * straight forward conftest * fix docs generation * fix tox environments * reformat tomls * cleanup pyproject * some play with renaming * move root conftest into pytest plugins * fix setup script * move fixtures to __init__.py * remove duplicate fixtures * disable pylint warning * simplify configuration fixture * remove empty conftest * remove crap from local pyprojects
35 lines
866 B
Python
35 lines
866 B
Python
import pytest
|
|
|
|
from ahriman.core.archive import ArchiveTrigger
|
|
from ahriman.core.archive.archive_tree import ArchiveTree
|
|
from ahriman.core.configuration import Configuration
|
|
|
|
|
|
@pytest.fixture
|
|
def archive_tree(configuration: Configuration) -> ArchiveTree:
|
|
"""
|
|
archive tree fixture
|
|
|
|
Args:
|
|
configuration(Configuration): configuration fixture
|
|
|
|
Returns:
|
|
ArchiveTree: archive tree test instance
|
|
"""
|
|
return ArchiveTree(configuration.repository_paths, [])
|
|
|
|
|
|
@pytest.fixture
|
|
def archive_trigger(configuration: Configuration) -> ArchiveTrigger:
|
|
"""
|
|
archive trigger fixture
|
|
|
|
Args:
|
|
configuration(Configuration): configuration fixture
|
|
|
|
Returns:
|
|
ArchiveTrigger: archive trigger test instance
|
|
"""
|
|
_, repository_id = configuration.check_loaded()
|
|
return ArchiveTrigger(repository_id, configuration)
|