From 1fca091a779af283592522afc372be5e0a545902 Mon Sep 17 00:00:00 2001 From: jtdub Date: Mon, 21 Sep 2026 19:41:36 -0600 Subject: [PATCH] test: assert version command against __version__ The version test hardcoded '0.2.0', so it broke when the package bumped to 0.2.1a0. Compare the output against __version__ instead so the test tracks the actual package version. --- CHANGELOG.md | 5 +++++ tests/test_cli.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38141e6..bd758c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 event; `release.yml` (on `release: published`) is now the single PyPI publish path, since `created` never fires for drafts that get published +### Fixed +- `test_version_command` asserted a hardcoded `0.2.0` in the version output, + so the `version` command failed once the package bumped to `0.2.1a0`. The + test now compares against `__version__`. + ## [0.2.0] - 2026-01-25 ### Added diff --git a/tests/test_cli.py b/tests/test_cli.py index 00d928c..516214e 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -7,7 +7,7 @@ import yaml from click.testing import CliRunner -from hier_config_cli import cli +from hier_config_cli import __version__, cli # Test `version` command @@ -17,7 +17,7 @@ def test_version_command() -> None: result = runner.invoke(cli, ["version"]) assert result.exit_code == 0 assert "hier-config-cli version" in result.output - assert "0.2.0" in result.output + assert __version__ in result.output # Test `list_platforms` command