Skip to content

Commit bca92d5

Browse files
authored
Fix test_python_get_preferred_default with Python pre-releases (#10303)
The version we check is now Version.parse("3.14.0.alpha.6") instead of Version.parse("3.14.0").
1 parent 274bdc9 commit bca92d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/utils/test_python_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ def test_python_get_system_python() -> None:
5151

5252
def test_python_get_preferred_default(config: Config) -> None:
5353
python = Python.get_preferred_python(config)
54+
version_len = 3 if sys.version_info[3] == "final" else 5
5455

5556
assert python.executable == Path(sys.executable)
5657
assert python.version == Version.parse(
57-
".".join(str(v) for v in sys.version_info[:3])
58+
".".join(str(v) for v in sys.version_info[:version_len])
5859
)
5960

6061

0 commit comments

Comments
 (0)