mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-06-28 06:41:43 +00:00
print configuration paths in dump command
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
import pytest
|
||||
|
||||
from ahriman.core.formatters import AurPrinter, ConfigurationPrinter, PackagePrinter, PatchPrinter, StatusPrinter, \
|
||||
StringPrinter, TreePrinter, UpdatePrinter, UserPrinter, ValidationPrinter, VersionPrinter
|
||||
from pathlib import Path
|
||||
|
||||
from ahriman.core.formatters import AurPrinter, ConfigurationPrinter, ConfigurationPathsPrinter, PackagePrinter,\
|
||||
PatchPrinter, StatusPrinter, StringPrinter, TreePrinter, UpdatePrinter, UserPrinter, ValidationPrinter, \
|
||||
VersionPrinter
|
||||
from ahriman.models.aur_package import AURPackage
|
||||
from ahriman.models.build_status import BuildStatus
|
||||
from ahriman.models.package import Package
|
||||
@ -23,6 +26,17 @@ def aur_package_ahriman_printer(aur_package_ahriman: AURPackage) -> AurPrinter:
|
||||
return AurPrinter(aur_package_ahriman)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def configuration_paths_printer() -> ConfigurationPathsPrinter:
|
||||
"""
|
||||
fixture for configuration paths printer
|
||||
|
||||
Returns:
|
||||
ConfigurationPathsPrinter: configuration paths printer test instance
|
||||
"""
|
||||
return ConfigurationPathsPrinter(Path("root"), [Path("include1"), Path("include2")])
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def configuration_printer() -> ConfigurationPrinter:
|
||||
"""
|
||||
|
@ -0,0 +1,15 @@
|
||||
from ahriman.core.formatters import ConfigurationPathsPrinter
|
||||
|
||||
|
||||
def test_properties(configuration_paths_printer: ConfigurationPathsPrinter) -> None:
|
||||
"""
|
||||
must return non-empty properties list
|
||||
"""
|
||||
assert configuration_paths_printer.properties()
|
||||
|
||||
|
||||
def test_title(configuration_paths_printer: ConfigurationPathsPrinter) -> None:
|
||||
"""
|
||||
must return non-empty title
|
||||
"""
|
||||
assert configuration_paths_printer.title() is not None
|
Reference in New Issue
Block a user