mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-01-30 01:49:48 +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
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2021 Evgenii Alekseev.
|
||||
# Copyright (c) 2021 ahriman team.
|
||||
#
|
||||
# This file is part of ahriman
|
||||
# (see https://github.com/arcan1s/ahriman).
|
||||
@@ -29,18 +29,18 @@ from ahriman.models.package import Package
|
||||
|
||||
|
||||
class Status(Handler):
|
||||
'''
|
||||
"""
|
||||
package status handler
|
||||
'''
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def run(cls: Type[Handler], args: argparse.Namespace, architecture: str, config: Configuration) -> None:
|
||||
'''
|
||||
"""
|
||||
callback for command line
|
||||
:param args: command line args
|
||||
:param architecture: repository architecture
|
||||
:param config: configuration instance
|
||||
'''
|
||||
"""
|
||||
application = Application(architecture, config)
|
||||
if args.ahriman:
|
||||
ahriman = application.repository.reporter.get_self()
|
||||
@@ -54,5 +54,5 @@ class Status(Handler):
|
||||
packages = application.repository.reporter.get(None)
|
||||
for package, package_status in sorted(packages, key=lambda item: item[0].base):
|
||||
print(package.pretty_print())
|
||||
print(f'\t{package.version}')
|
||||
print(f'\t{package_status.pretty_print()}')
|
||||
print(f"\t{package.version}")
|
||||
print(f"\t{package_status.pretty_print()}")
|
||||
|
||||
Reference in New Issue
Block a user