From a4efb847ba613d60fa145944f315c50ce8b22bf2 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 9 Dec 2025 14:33:32 +0100 Subject: [PATCH] Cleaned Up tests --- pkgmgr/cli/commands/branch.py | 1 - pkgmgr/cli/commands/release.py | 5 ++--- ...ntegration_branch_commands.py => test_branch_commands.py} | 0 ...tion_changelog_commands.py => test_changelog_commands.py} | 0 ...ntegration_config_commands.py => test_config_commands.py} | 0 ...on_install_all_shallow.py => test_install_all_shallow.py} | 0 ...tall_pkgmgr_shallow.py => test_install_pkgmgr_shallow.py} | 0 ...st_integration_list_commands.py => test_list_commands.py} | 0 ...st_integration_make_commands.py => test_make_commands.py} | 0 ..._integration_proxy_commands.py => test_proxy_commands.py} | 0 ...egration_release_commands.py => test_release_commands.py} | 0 ..._integration_tools_commands.py => test_tools_commands.py} | 0 ...egration_version_commands.py => test_version_commands.py} | 0 ...st_install_repos_integration.md => test_install_repos.md} | 0 ...st_install_repos_integration.py => test_install_repos.py} | 2 -- ...ilities_integration.md => test_recursive_capabilities.md} | 0 ...ilities_integration.py => test_recursive_capabilities.py} | 0 tests/unit/pkgmgr/{cli_core => actions}/__init__.py | 0 .../{cli_core/commands => actions/install}/__init__.py | 0 .../unit/pkgmgr/{ => actions/install}/installers/__init__.py | 0 .../{ => actions/install}/installers/os_packages/__init__.py | 0 .../install}/installers/os_packages/test_arch_pkgbuild.py | 0 .../install}/installers/os_packages/test_debian_control.py | 0 .../install}/installers/os_packages/test_rpm_spec.py | 0 .../pkgmgr/{ => actions/install}/installers/test_base.py | 0 .../install}/installers/test_makefile_installer.py | 0 .../{ => actions/install}/installers/test_nix_flake.py | 0 .../install}/installers/test_python_installer.py | 0 tests/unit/pkgmgr/{ => actions/install}/test_capabilities.py | 0 tests/unit/pkgmgr/{ => actions/install}/test_context.py | 0 .../unit/pkgmgr/{ => actions/install}/test_install_repos.py | 0 tests/unit/pkgmgr/actions/repos/__init__.py | 0 .../{test_clone_repos.py => actions/repos/test_clone.py} | 0 .../{test_branch_commands.py => actions/test_branch.py} | 0 tests/unit/pkgmgr/{ => actions}/test_changelog.py | 0 tests/unit/pkgmgr/{ => actions}/test_release.py | 0 tests/unit/pkgmgr/cli/__init__.py | 0 tests/unit/pkgmgr/cli/commands/__init__.py | 0 tests/unit/pkgmgr/{cli_core => cli}/commands/test_release.py | 2 +- tests/unit/pkgmgr/{cli_core => cli}/test_branch_cli.py | 2 +- tests/unit/pkgmgr/{ => cli}/test_cli.py | 0 tests/unit/pkgmgr/{ => cli}/test_cli_branch.py | 0 tests/unit/pkgmgr/core/__init__.py | 0 tests/unit/pkgmgr/{ => core}/test_create_ink.py | 0 tests/unit/pkgmgr/{ => core}/test_git_utils.py | 0 tests/unit/pkgmgr/{ => core}/test_resolve_command.py | 0 tests/unit/pkgmgr/{ => core}/test_versioning.py | 0 47 files changed, 4 insertions(+), 8 deletions(-) rename tests/e2e/{test_integration_branch_commands.py => test_branch_commands.py} (100%) rename tests/e2e/{test_integration_changelog_commands.py => test_changelog_commands.py} (100%) rename tests/e2e/{test_integration_config_commands.py => test_config_commands.py} (100%) rename tests/e2e/{test_integration_install_all_shallow.py => test_install_all_shallow.py} (100%) rename tests/e2e/{test_integration_install_pkgmgr_shallow.py => test_install_pkgmgr_shallow.py} (100%) rename tests/e2e/{test_integration_list_commands.py => test_list_commands.py} (100%) rename tests/e2e/{test_integration_make_commands.py => test_make_commands.py} (100%) rename tests/e2e/{test_integration_proxy_commands.py => test_proxy_commands.py} (100%) rename tests/e2e/{test_integration_release_commands.py => test_release_commands.py} (100%) rename tests/e2e/{test_integration_tools_commands.py => test_tools_commands.py} (100%) rename tests/e2e/{test_integration_version_commands.py => test_version_commands.py} (100%) rename tests/integration/{test_install_repos_integration.md => test_install_repos.md} (100%) rename tests/integration/{test_install_repos_integration.py => test_install_repos.py} (99%) rename tests/integration/{test_recursive_capabilities_integration.md => test_recursive_capabilities.md} (100%) rename tests/integration/{test_recursive_capabilities_integration.py => test_recursive_capabilities.py} (100%) rename tests/unit/pkgmgr/{cli_core => actions}/__init__.py (100%) rename tests/unit/pkgmgr/{cli_core/commands => actions/install}/__init__.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/installers/__init__.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/installers/os_packages/__init__.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/installers/os_packages/test_arch_pkgbuild.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/installers/os_packages/test_debian_control.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/installers/os_packages/test_rpm_spec.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/installers/test_base.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/installers/test_makefile_installer.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/installers/test_nix_flake.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/installers/test_python_installer.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/test_capabilities.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/test_context.py (100%) rename tests/unit/pkgmgr/{ => actions/install}/test_install_repos.py (100%) create mode 100644 tests/unit/pkgmgr/actions/repos/__init__.py rename tests/unit/pkgmgr/{test_clone_repos.py => actions/repos/test_clone.py} (100%) rename tests/unit/pkgmgr/{test_branch_commands.py => actions/test_branch.py} (100%) rename tests/unit/pkgmgr/{ => actions}/test_changelog.py (100%) rename tests/unit/pkgmgr/{ => actions}/test_release.py (100%) create mode 100644 tests/unit/pkgmgr/cli/__init__.py create mode 100644 tests/unit/pkgmgr/cli/commands/__init__.py rename tests/unit/pkgmgr/{cli_core => cli}/commands/test_release.py (99%) rename tests/unit/pkgmgr/{cli_core => cli}/test_branch_cli.py (98%) rename tests/unit/pkgmgr/{ => cli}/test_cli.py (100%) rename tests/unit/pkgmgr/{ => cli}/test_cli_branch.py (100%) create mode 100644 tests/unit/pkgmgr/core/__init__.py rename tests/unit/pkgmgr/{ => core}/test_create_ink.py (100%) rename tests/unit/pkgmgr/{ => core}/test_git_utils.py (100%) rename tests/unit/pkgmgr/{ => core}/test_resolve_command.py (100%) rename tests/unit/pkgmgr/{ => core}/test_versioning.py (100%) diff --git a/pkgmgr/cli/commands/branch.py b/pkgmgr/cli/commands/branch.py index 746b663..f67ff81 100644 --- a/pkgmgr/cli/commands/branch.py +++ b/pkgmgr/cli/commands/branch.py @@ -1,4 +1,3 @@ -# pkgmgr/cli_core/commands/branch.py from __future__ import annotations import sys diff --git a/pkgmgr/cli/commands/release.py b/pkgmgr/cli/commands/release.py index 95b42fe..71077d8 100644 --- a/pkgmgr/cli/commands/release.py +++ b/pkgmgr/cli/commands/release.py @@ -1,4 +1,3 @@ -# pkgmgr/cli_core/commands/release.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- @@ -6,8 +5,8 @@ Release command wiring for the pkgmgr CLI. This module implements the `pkgmgr release` subcommand on top of the -generic selection logic from cli_core.dispatch. It does not define its -own subparser; the CLI surface is configured in cli_core.parser. +generic selection logic from cli.dispatch. It does not define its +own subparser; the CLI surface is configured in cli.parser. Responsibilities: - Take the parsed argparse.Namespace for the `release` command. diff --git a/tests/e2e/test_integration_branch_commands.py b/tests/e2e/test_branch_commands.py similarity index 100% rename from tests/e2e/test_integration_branch_commands.py rename to tests/e2e/test_branch_commands.py diff --git a/tests/e2e/test_integration_changelog_commands.py b/tests/e2e/test_changelog_commands.py similarity index 100% rename from tests/e2e/test_integration_changelog_commands.py rename to tests/e2e/test_changelog_commands.py diff --git a/tests/e2e/test_integration_config_commands.py b/tests/e2e/test_config_commands.py similarity index 100% rename from tests/e2e/test_integration_config_commands.py rename to tests/e2e/test_config_commands.py diff --git a/tests/e2e/test_integration_install_all_shallow.py b/tests/e2e/test_install_all_shallow.py similarity index 100% rename from tests/e2e/test_integration_install_all_shallow.py rename to tests/e2e/test_install_all_shallow.py diff --git a/tests/e2e/test_integration_install_pkgmgr_shallow.py b/tests/e2e/test_install_pkgmgr_shallow.py similarity index 100% rename from tests/e2e/test_integration_install_pkgmgr_shallow.py rename to tests/e2e/test_install_pkgmgr_shallow.py diff --git a/tests/e2e/test_integration_list_commands.py b/tests/e2e/test_list_commands.py similarity index 100% rename from tests/e2e/test_integration_list_commands.py rename to tests/e2e/test_list_commands.py diff --git a/tests/e2e/test_integration_make_commands.py b/tests/e2e/test_make_commands.py similarity index 100% rename from tests/e2e/test_integration_make_commands.py rename to tests/e2e/test_make_commands.py diff --git a/tests/e2e/test_integration_proxy_commands.py b/tests/e2e/test_proxy_commands.py similarity index 100% rename from tests/e2e/test_integration_proxy_commands.py rename to tests/e2e/test_proxy_commands.py diff --git a/tests/e2e/test_integration_release_commands.py b/tests/e2e/test_release_commands.py similarity index 100% rename from tests/e2e/test_integration_release_commands.py rename to tests/e2e/test_release_commands.py diff --git a/tests/e2e/test_integration_tools_commands.py b/tests/e2e/test_tools_commands.py similarity index 100% rename from tests/e2e/test_integration_tools_commands.py rename to tests/e2e/test_tools_commands.py diff --git a/tests/e2e/test_integration_version_commands.py b/tests/e2e/test_version_commands.py similarity index 100% rename from tests/e2e/test_integration_version_commands.py rename to tests/e2e/test_version_commands.py diff --git a/tests/integration/test_install_repos_integration.md b/tests/integration/test_install_repos.md similarity index 100% rename from tests/integration/test_install_repos_integration.md rename to tests/integration/test_install_repos.md diff --git a/tests/integration/test_install_repos_integration.py b/tests/integration/test_install_repos.py similarity index 99% rename from tests/integration/test_install_repos_integration.py rename to tests/integration/test_install_repos.py index 75ec6ae..60a64c5 100644 --- a/tests/integration/test_install_repos_integration.py +++ b/tests/integration/test_install_repos.py @@ -1,5 +1,3 @@ -# tests/integration/test_install_repos_integration.py - import os import tempfile import unittest diff --git a/tests/integration/test_recursive_capabilities_integration.md b/tests/integration/test_recursive_capabilities.md similarity index 100% rename from tests/integration/test_recursive_capabilities_integration.md rename to tests/integration/test_recursive_capabilities.md diff --git a/tests/integration/test_recursive_capabilities_integration.py b/tests/integration/test_recursive_capabilities.py similarity index 100% rename from tests/integration/test_recursive_capabilities_integration.py rename to tests/integration/test_recursive_capabilities.py diff --git a/tests/unit/pkgmgr/cli_core/__init__.py b/tests/unit/pkgmgr/actions/__init__.py similarity index 100% rename from tests/unit/pkgmgr/cli_core/__init__.py rename to tests/unit/pkgmgr/actions/__init__.py diff --git a/tests/unit/pkgmgr/cli_core/commands/__init__.py b/tests/unit/pkgmgr/actions/install/__init__.py similarity index 100% rename from tests/unit/pkgmgr/cli_core/commands/__init__.py rename to tests/unit/pkgmgr/actions/install/__init__.py diff --git a/tests/unit/pkgmgr/installers/__init__.py b/tests/unit/pkgmgr/actions/install/installers/__init__.py similarity index 100% rename from tests/unit/pkgmgr/installers/__init__.py rename to tests/unit/pkgmgr/actions/install/installers/__init__.py diff --git a/tests/unit/pkgmgr/installers/os_packages/__init__.py b/tests/unit/pkgmgr/actions/install/installers/os_packages/__init__.py similarity index 100% rename from tests/unit/pkgmgr/installers/os_packages/__init__.py rename to tests/unit/pkgmgr/actions/install/installers/os_packages/__init__.py diff --git a/tests/unit/pkgmgr/installers/os_packages/test_arch_pkgbuild.py b/tests/unit/pkgmgr/actions/install/installers/os_packages/test_arch_pkgbuild.py similarity index 100% rename from tests/unit/pkgmgr/installers/os_packages/test_arch_pkgbuild.py rename to tests/unit/pkgmgr/actions/install/installers/os_packages/test_arch_pkgbuild.py diff --git a/tests/unit/pkgmgr/installers/os_packages/test_debian_control.py b/tests/unit/pkgmgr/actions/install/installers/os_packages/test_debian_control.py similarity index 100% rename from tests/unit/pkgmgr/installers/os_packages/test_debian_control.py rename to tests/unit/pkgmgr/actions/install/installers/os_packages/test_debian_control.py diff --git a/tests/unit/pkgmgr/installers/os_packages/test_rpm_spec.py b/tests/unit/pkgmgr/actions/install/installers/os_packages/test_rpm_spec.py similarity index 100% rename from tests/unit/pkgmgr/installers/os_packages/test_rpm_spec.py rename to tests/unit/pkgmgr/actions/install/installers/os_packages/test_rpm_spec.py diff --git a/tests/unit/pkgmgr/installers/test_base.py b/tests/unit/pkgmgr/actions/install/installers/test_base.py similarity index 100% rename from tests/unit/pkgmgr/installers/test_base.py rename to tests/unit/pkgmgr/actions/install/installers/test_base.py diff --git a/tests/unit/pkgmgr/installers/test_makefile_installer.py b/tests/unit/pkgmgr/actions/install/installers/test_makefile_installer.py similarity index 100% rename from tests/unit/pkgmgr/installers/test_makefile_installer.py rename to tests/unit/pkgmgr/actions/install/installers/test_makefile_installer.py diff --git a/tests/unit/pkgmgr/installers/test_nix_flake.py b/tests/unit/pkgmgr/actions/install/installers/test_nix_flake.py similarity index 100% rename from tests/unit/pkgmgr/installers/test_nix_flake.py rename to tests/unit/pkgmgr/actions/install/installers/test_nix_flake.py diff --git a/tests/unit/pkgmgr/installers/test_python_installer.py b/tests/unit/pkgmgr/actions/install/installers/test_python_installer.py similarity index 100% rename from tests/unit/pkgmgr/installers/test_python_installer.py rename to tests/unit/pkgmgr/actions/install/installers/test_python_installer.py diff --git a/tests/unit/pkgmgr/test_capabilities.py b/tests/unit/pkgmgr/actions/install/test_capabilities.py similarity index 100% rename from tests/unit/pkgmgr/test_capabilities.py rename to tests/unit/pkgmgr/actions/install/test_capabilities.py diff --git a/tests/unit/pkgmgr/test_context.py b/tests/unit/pkgmgr/actions/install/test_context.py similarity index 100% rename from tests/unit/pkgmgr/test_context.py rename to tests/unit/pkgmgr/actions/install/test_context.py diff --git a/tests/unit/pkgmgr/test_install_repos.py b/tests/unit/pkgmgr/actions/install/test_install_repos.py similarity index 100% rename from tests/unit/pkgmgr/test_install_repos.py rename to tests/unit/pkgmgr/actions/install/test_install_repos.py diff --git a/tests/unit/pkgmgr/actions/repos/__init__.py b/tests/unit/pkgmgr/actions/repos/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/pkgmgr/test_clone_repos.py b/tests/unit/pkgmgr/actions/repos/test_clone.py similarity index 100% rename from tests/unit/pkgmgr/test_clone_repos.py rename to tests/unit/pkgmgr/actions/repos/test_clone.py diff --git a/tests/unit/pkgmgr/test_branch_commands.py b/tests/unit/pkgmgr/actions/test_branch.py similarity index 100% rename from tests/unit/pkgmgr/test_branch_commands.py rename to tests/unit/pkgmgr/actions/test_branch.py diff --git a/tests/unit/pkgmgr/test_changelog.py b/tests/unit/pkgmgr/actions/test_changelog.py similarity index 100% rename from tests/unit/pkgmgr/test_changelog.py rename to tests/unit/pkgmgr/actions/test_changelog.py diff --git a/tests/unit/pkgmgr/test_release.py b/tests/unit/pkgmgr/actions/test_release.py similarity index 100% rename from tests/unit/pkgmgr/test_release.py rename to tests/unit/pkgmgr/actions/test_release.py diff --git a/tests/unit/pkgmgr/cli/__init__.py b/tests/unit/pkgmgr/cli/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/pkgmgr/cli/commands/__init__.py b/tests/unit/pkgmgr/cli/commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/pkgmgr/cli_core/commands/test_release.py b/tests/unit/pkgmgr/cli/commands/test_release.py similarity index 99% rename from tests/unit/pkgmgr/cli_core/commands/test_release.py rename to tests/unit/pkgmgr/cli/commands/test_release.py index 40ce111..738ae66 100644 --- a/tests/unit/pkgmgr/cli_core/commands/test_release.py +++ b/tests/unit/pkgmgr/cli/commands/test_release.py @@ -6,7 +6,7 @@ Unit tests for pkgmgr.cli.commands.release. These tests focus on the wiring layer: - Argument handling for the release command as defined by the - top-level parser (cli_core.parser.create_parser). + top-level parser (cli.parser.create_parser). - Correct invocation of pkgmgr.actions.release.release(...) for the selected repositories. - Behaviour of --preview, --list, --close, and -f/--force. diff --git a/tests/unit/pkgmgr/cli_core/test_branch_cli.py b/tests/unit/pkgmgr/cli/test_branch_cli.py similarity index 98% rename from tests/unit/pkgmgr/cli_core/test_branch_cli.py rename to tests/unit/pkgmgr/cli/test_branch_cli.py index 58dce0c..a0e67be 100644 --- a/tests/unit/pkgmgr/cli_core/test_branch_cli.py +++ b/tests/unit/pkgmgr/cli/test_branch_cli.py @@ -22,7 +22,7 @@ from pkgmgr.cli.commands.branch import handle_branch class TestBranchCLI(unittest.TestCase): """ - Tests for the branch subcommands implemented in cli_core. + Tests for the branch subcommands implemented in cli. """ def _create_parser(self): diff --git a/tests/unit/pkgmgr/test_cli.py b/tests/unit/pkgmgr/cli/test_cli.py similarity index 100% rename from tests/unit/pkgmgr/test_cli.py rename to tests/unit/pkgmgr/cli/test_cli.py diff --git a/tests/unit/pkgmgr/test_cli_branch.py b/tests/unit/pkgmgr/cli/test_cli_branch.py similarity index 100% rename from tests/unit/pkgmgr/test_cli_branch.py rename to tests/unit/pkgmgr/cli/test_cli_branch.py diff --git a/tests/unit/pkgmgr/core/__init__.py b/tests/unit/pkgmgr/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/unit/pkgmgr/test_create_ink.py b/tests/unit/pkgmgr/core/test_create_ink.py similarity index 100% rename from tests/unit/pkgmgr/test_create_ink.py rename to tests/unit/pkgmgr/core/test_create_ink.py diff --git a/tests/unit/pkgmgr/test_git_utils.py b/tests/unit/pkgmgr/core/test_git_utils.py similarity index 100% rename from tests/unit/pkgmgr/test_git_utils.py rename to tests/unit/pkgmgr/core/test_git_utils.py diff --git a/tests/unit/pkgmgr/test_resolve_command.py b/tests/unit/pkgmgr/core/test_resolve_command.py similarity index 100% rename from tests/unit/pkgmgr/test_resolve_command.py rename to tests/unit/pkgmgr/core/test_resolve_command.py diff --git a/tests/unit/pkgmgr/test_versioning.py b/tests/unit/pkgmgr/core/test_versioning.py similarity index 100% rename from tests/unit/pkgmgr/test_versioning.py rename to tests/unit/pkgmgr/core/test_versioning.py