mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-29 21:59:55 +00:00
improve wording in documentation
This commit is contained in:
@ -10,7 +10,7 @@ def test_auth_control(auth: Auth) -> None:
|
||||
must return a control for authorization
|
||||
"""
|
||||
assert auth.auth_control
|
||||
assert "button" in auth.auth_control # I think it should be button
|
||||
assert "button" in auth.auth_control # I think it should be a button
|
||||
|
||||
|
||||
def test_load_dummy(configuration: Configuration, database: SQLite) -> None:
|
||||
|
@ -16,10 +16,10 @@ def test_extend_architectures(mocker: MockerFixture) -> None:
|
||||
must update available architecture list
|
||||
"""
|
||||
mocker.patch("pathlib.Path.is_file", return_value=True)
|
||||
archs_mock = mocker.patch("ahriman.models.package.Package.supported_architectures", return_value={"x86_64"})
|
||||
architectures_mock = mocker.patch("ahriman.models.package.Package.supported_architectures", return_value={"x86_64"})
|
||||
|
||||
assert Sources.extend_architectures(Path("local"), "i686") == [PkgbuildPatch("arch", list({"x86_64", "i686"}))]
|
||||
archs_mock.assert_called_once_with(Path("local"))
|
||||
architectures_mock.assert_called_once_with(Path("local"))
|
||||
|
||||
|
||||
def test_extend_architectures_any(mocker: MockerFixture) -> None:
|
||||
@ -256,7 +256,7 @@ def test_add_intent_to_add(sources: Sources, mocker: MockerFixture) -> None:
|
||||
|
||||
def test_add_skip(sources: Sources, mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must skip addition of files to index if no fiels found
|
||||
must skip addition of files to index if no fields found
|
||||
"""
|
||||
mocker.patch("pathlib.Path.glob", return_value=[])
|
||||
check_output_mock = mocker.patch("ahriman.core.build_tools.sources.Sources._check_output")
|
||||
|
@ -63,7 +63,7 @@ def test_run(migrations: Migrations, mocker: MockerFixture) -> None:
|
||||
|
||||
def test_run_migration_exception(migrations: Migrations, mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must rollback and close cursor on exception during migration
|
||||
must roll back and close cursor on exception during migration
|
||||
"""
|
||||
cursor = MagicMock()
|
||||
mocker.patch("logging.Logger.info", side_effect=Exception())
|
||||
|
@ -3,13 +3,13 @@ from ahriman.core.formatters import AurPrinter
|
||||
|
||||
def test_properties(aur_package_ahriman_printer: AurPrinter) -> None:
|
||||
"""
|
||||
must return non empty properties list
|
||||
must return non-empty properties list
|
||||
"""
|
||||
assert aur_package_ahriman_printer.properties()
|
||||
|
||||
|
||||
def test_title(aur_package_ahriman_printer: AurPrinter) -> None:
|
||||
"""
|
||||
must return non empty title
|
||||
must return non-empty title
|
||||
"""
|
||||
assert aur_package_ahriman_printer.title() is not None
|
||||
|
@ -3,7 +3,7 @@ from ahriman.core.formatters import ConfigurationPrinter
|
||||
|
||||
def test_properties(configuration_printer: ConfigurationPrinter) -> None:
|
||||
"""
|
||||
must return non empty properties list
|
||||
must return non-empty properties list
|
||||
"""
|
||||
assert configuration_printer.properties()
|
||||
|
||||
@ -17,6 +17,6 @@ def test_properties_required(configuration_printer: ConfigurationPrinter) -> Non
|
||||
|
||||
def test_title(configuration_printer: ConfigurationPrinter) -> None:
|
||||
"""
|
||||
must return non empty title
|
||||
must return non-empty title
|
||||
"""
|
||||
assert configuration_printer.title() == "[section]"
|
||||
|
@ -3,13 +3,13 @@ from ahriman.core.formatters import PackagePrinter
|
||||
|
||||
def test_properties(package_ahriman_printer: PackagePrinter) -> None:
|
||||
"""
|
||||
must return non empty properties list
|
||||
must return non-empty properties list
|
||||
"""
|
||||
assert package_ahriman_printer.properties()
|
||||
|
||||
|
||||
def test_title(package_ahriman_printer: PackagePrinter) -> None:
|
||||
"""
|
||||
must return non empty title
|
||||
must return non-empty title
|
||||
"""
|
||||
assert package_ahriman_printer.title() is not None
|
||||
|
@ -3,7 +3,7 @@ from ahriman.core.formatters import PatchPrinter
|
||||
|
||||
def test_properties(patch_printer: PatchPrinter) -> None:
|
||||
"""
|
||||
must return non empty properties list
|
||||
must return non-empty properties list
|
||||
"""
|
||||
assert patch_printer.properties()
|
||||
|
||||
@ -17,6 +17,6 @@ def test_properties_required(patch_printer: PatchPrinter) -> None:
|
||||
|
||||
def test_title(patch_printer: PatchPrinter) -> None:
|
||||
"""
|
||||
must return non empty title
|
||||
must return non-empty title
|
||||
"""
|
||||
assert patch_printer.title() == "ahriman"
|
||||
|
@ -10,6 +10,6 @@ def test_properties(status_printer: StatusPrinter) -> None:
|
||||
|
||||
def test_title(status_printer: StatusPrinter) -> None:
|
||||
"""
|
||||
must return non empty title
|
||||
must return non-empty title
|
||||
"""
|
||||
assert status_printer.title() is not None
|
||||
|
@ -10,6 +10,6 @@ def test_properties(string_printer: StringPrinter) -> None:
|
||||
|
||||
def test_title(string_printer: StringPrinter) -> None:
|
||||
"""
|
||||
must return non empty title
|
||||
must return non-empty title
|
||||
"""
|
||||
assert string_printer.title() is not None
|
||||
|
@ -10,6 +10,6 @@ def test_properties(update_printer: UpdatePrinter) -> None:
|
||||
|
||||
def test_title(update_printer: UpdatePrinter) -> None:
|
||||
"""
|
||||
must return non empty title
|
||||
must return non-empty title
|
||||
"""
|
||||
assert update_printer.title() is not None
|
||||
|
@ -3,13 +3,13 @@ from ahriman.core.formatters import UserPrinter
|
||||
|
||||
def test_properties(user_printer: UserPrinter) -> None:
|
||||
"""
|
||||
must return non empty properties list
|
||||
must return non-empty properties list
|
||||
"""
|
||||
assert user_printer.properties()
|
||||
|
||||
|
||||
def test_title(user_printer: UserPrinter) -> None:
|
||||
"""
|
||||
must return non empty title
|
||||
must return non-empty title
|
||||
"""
|
||||
assert user_printer.title() is not None
|
||||
|
@ -10,6 +10,6 @@ def test_properties(version_printer: VersionPrinter) -> None:
|
||||
|
||||
def test_title(version_printer: VersionPrinter) -> None:
|
||||
"""
|
||||
must return non empty title
|
||||
must return non-empty title
|
||||
"""
|
||||
assert version_printer.title() is not None
|
||||
|
@ -20,7 +20,7 @@ def test_load(configuration: Configuration, mocker: MockerFixture) -> None:
|
||||
|
||||
def test_load_fallback(configuration: Configuration, mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must fallback to stderr without errors
|
||||
must fall back to stderr without errors
|
||||
"""
|
||||
mocker.patch("ahriman.core.log.log.fileConfig", side_effect=PermissionError())
|
||||
Log.load(configuration, quiet=False, report=False)
|
||||
|
@ -5,6 +5,7 @@ from pytest_mock import MockerFixture
|
||||
from ahriman.core.configuration import Configuration
|
||||
from ahriman.core.report.html import HTML
|
||||
from ahriman.models.package import Package
|
||||
from ahriman.models.result import Result
|
||||
|
||||
|
||||
def test_generate(configuration: Configuration, package_ahriman: Package, mocker: MockerFixture) -> None:
|
||||
@ -14,5 +15,5 @@ def test_generate(configuration: Configuration, package_ahriman: Package, mocker
|
||||
write_mock = mocker.patch("pathlib.Path.write_text")
|
||||
|
||||
report = HTML("x86_64", configuration, "html")
|
||||
report.generate([package_ahriman], [])
|
||||
report.generate([package_ahriman], Result())
|
||||
write_mock.assert_called_once_with(pytest.helpers.anyvar(int))
|
||||
|
@ -17,7 +17,7 @@ def test_leaf_is_root_empty(leaf_ahriman: Leaf) -> None:
|
||||
|
||||
def test_leaf_is_root_false(leaf_ahriman: Leaf, leaf_python_schedule: Leaf) -> None:
|
||||
"""
|
||||
must be root for empty dependencies list or if does not depend on packages
|
||||
must be root for empty dependencies list or if it does not depend on packages
|
||||
"""
|
||||
assert leaf_ahriman.is_root([leaf_python_schedule])
|
||||
leaf_ahriman.dependencies = {"ahriman-dependency"}
|
||||
|
@ -13,7 +13,7 @@ def test_on_result(trigger: Trigger) -> None:
|
||||
|
||||
def test_on_result_run(trigger: Trigger) -> None:
|
||||
"""
|
||||
must fallback to run method if it exists
|
||||
must fall back to run method if it exists
|
||||
"""
|
||||
run_mock = MagicMock()
|
||||
setattr(trigger, "run", run_mock)
|
||||
|
@ -59,7 +59,7 @@ def test_asset_upload_with_removal(github: Github, github_release: Dict[str, Any
|
||||
|
||||
def test_asset_upload_empty_mimetype(github: Github, github_release: Dict[str, Any], mocker: MockerFixture) -> None:
|
||||
"""
|
||||
must upload asset to the repository with empty mime type if cannot guess it
|
||||
must upload asset to the repository with empty mime type if the library cannot guess it
|
||||
"""
|
||||
mocker.patch("pathlib.Path.open", return_value=b"")
|
||||
mocker.patch("ahriman.core.upload.github.Github.asset_remove")
|
||||
|
Reference in New Issue
Block a user