full support of pep517

Since llast upgrade build is broken. Lets fully migrate to
pyproject.toml. Note for maintaners: because data_files option is
deprectated (see https://github.com/pypa/setuptools/discussions/2648)
you will have to install files manually inside your packaging process
This commit is contained in:
2023-08-11 03:01:18 +03:00
parent 3a88d00db0
commit 1baf04998d
34 changed files with 147 additions and 266 deletions

View File

@ -2,7 +2,7 @@ import argparse
from pytest_mock import MockerFixture
from ahriman import version
from ahriman import __version__
from ahriman.application.handlers import ServiceUpdates
from ahriman.core.configuration import Configuration
from ahriman.core.repository import Repository
@ -46,7 +46,7 @@ def test_run_skip(args: argparse.Namespace, configuration: Configuration, reposi
"""
must do not perform any actions if package is up-to-date
"""
package_ahriman.version = f"{version.__version__}-1"
package_ahriman.version = f"{__version__}-1"
args = _default_args(args)
mocker.patch("ahriman.core.repository.Repository.load", return_value=repository)
mocker.patch("ahriman.models.package.Package.from_aur", return_value=package_ahriman)

View File

@ -58,9 +58,11 @@ def test_run_verbose(args: argparse.Namespace, configuration: Configuration, rep
args = _default_args(args)
args.verbose = True
mocker.patch("ahriman.core.repository.Repository.load", return_value=repository)
read_mock = mocker.patch("pathlib.Path.read_text", return_value="")
print_mock = mocker.patch("ahriman.core.formatters.Printer.print")
application_mock = mocker.patch("code.interact")
Shell.run(args, "x86_64", configuration, report=False)
application_mock.assert_called_once_with(local=pytest.helpers.anyvar(int))
read_mock.assert_called_once_with(encoding="utf8")
print_mock.assert_called_once_with(verbose=False)