mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-12-15 03:33:42 +00:00
* add models tests (#1) also replace single quote to double one to confort PEP docstring + move _check_output to class properties to make it available for mocking * alpm tests implementation * try to replace os with pathlib * update tests for pathlib * fix includes glob and trim version from dependencies * build_tools package tests * repository component tests * add sign tests * complete status tests * handle exceptions in actual_version calls * complete core tests * move configuration to root conftest * application tests * complete application tests * change copyright to more generic one * base web tests * complete web tests * complete testkit also add argument parsers test
35 lines
1.0 KiB
Python
35 lines
1.0 KiB
Python
import pytest
|
|
|
|
from ahriman.core.alpm.pacman import Pacman
|
|
from ahriman.core.alpm.repo import Repo
|
|
from ahriman.core.build_tools.task import Task
|
|
from ahriman.core.configuration import Configuration
|
|
from ahriman.core.tree import Leaf
|
|
from ahriman.models.package import Package
|
|
from ahriman.models.repository_paths import RepositoryPaths
|
|
|
|
|
|
@pytest.fixture
|
|
def leaf_ahriman(package_ahriman: Package) -> Leaf:
|
|
return Leaf(package_ahriman, set())
|
|
|
|
|
|
@pytest.fixture
|
|
def leaf_python_schedule(package_python_schedule: Package) -> Leaf:
|
|
return Leaf(package_python_schedule, set())
|
|
|
|
|
|
@pytest.fixture
|
|
def pacman(configuration: Configuration) -> Pacman:
|
|
return Pacman(configuration)
|
|
|
|
|
|
@pytest.fixture
|
|
def repo(configuration: Configuration, repository_paths: RepositoryPaths) -> Repo:
|
|
return Repo(configuration.get("repository", "name"), repository_paths, [])
|
|
|
|
|
|
@pytest.fixture
|
|
def task_ahriman(package_ahriman: Package, configuration: Configuration, repository_paths: RepositoryPaths) -> Task:
|
|
return Task(package_ahriman, "x86_64", configuration, repository_paths)
|