Add some typing to tests

This commit is contained in:
Ayaz Salikhov
2022-01-18 19:13:17 +03:00
parent ee77b7831e
commit 2a1316c9ac
24 changed files with 211 additions and 141 deletions

View File

@@ -4,6 +4,7 @@
import logging
import pytest
from conftest import TrackedContainer
from helpers import CondaPackageHelper
@@ -11,10 +12,10 @@ LOGGER = logging.getLogger(__name__)
@pytest.mark.info
def test_outdated_packages(container, specifications_only=True):
def test_outdated_packages(container: TrackedContainer, requested_only: bool = True):
"""Getting the list of updatable packages"""
LOGGER.info(f"Checking outdated packages in {container.image_name} ...")
pkg_helper = CondaPackageHelper(container)
pkg_helper.check_updatable_packages(specifications_only)
LOGGER.info(pkg_helper.get_outdated_summary(specifications_only))
pkg_helper.check_updatable_packages(requested_only)
LOGGER.info(pkg_helper.get_outdated_summary(requested_only))
LOGGER.info(f"\n{pkg_helper.get_outdated_table()}\n")