File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55import pytest
66
7+ from balatrobench import __version__
78from balatrobench .cli import (
89 VERSION_PARTS_PATTERN ,
910 VERSION_PATTERN ,
@@ -81,7 +82,7 @@ def test_infer_version_nested(self, tmp_path: Path) -> None:
8182 # Path like /path/to/v1.0.0/subdir - the leaf is "subdir" not the version
8283 path = tmp_path / "v1.0.0" / "subdir"
8384 # Since the function only checks .name (the leaf), this returns default
84- assert infer_version (path ) == "v1.0.0 " # Default fallback
85+ assert infer_version (path ) == f"v { __version__ } " # Default fallback
8586
8687 def test_infer_version_invalid (self ) -> None :
8788 """Returns default for non-versioned paths."""
@@ -92,7 +93,9 @@ def test_infer_version_invalid(self) -> None:
9293 Path ("1.0.0" ), # No 'v' prefix
9394 ]
9495 for path in invalid_paths :
95- assert infer_version (path ) == "v1.0.0" , f"{ path } should return default"
96+ assert infer_version (path ) == f"v{ __version__ } " , (
97+ f"{ path } should return default"
98+ )
9699
97100
98101class TestVersionSortKey :
You can’t perform that action at this time.
0 commit comments