Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit 7e73558

Browse files
committed
fix(tests): remove hardcoded version checks
- Make version tests verify format instead of specific value - Prevents CI failures on version bumps
1 parent fede627 commit 7e73558

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

tests/test_init.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ class TestPackageVersion:
1919
"""Tests for package version exposure."""
2020

2121
def test_version_accessible(self) -> None:
22-
"""Test that __version__ is accessible."""
22+
"""Test that __version__ is accessible and valid."""
2323
from git_notes_memory import __version__
2424

25-
assert __version__ == "0.1.0"
25+
# Version should be a valid semver string
26+
assert __version__
27+
assert len(__version__.split(".")) == 3
2628

2729
def test_version_is_string(self) -> None:
2830
"""Test that __version__ is a string."""

tests/test_main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88

99
def test_version() -> None:
10-
"""Test that version is defined."""
11-
assert __version__ == "0.1.0"
10+
"""Test that version is defined and valid."""
11+
assert __version__
12+
assert len(__version__.split(".")) == 3
1213

1314

1415
def test_main_no_args_returns_zero() -> None:

0 commit comments

Comments
 (0)