-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
env: add support for untagged CPython builds where platform.python_ve…
…rsion() ends with a "+" works around python/cpython#99968
- Loading branch information
1 parent
2a2abce
commit 8e1e87c
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from __future__ import annotations | ||
|
||
import sys | ||
|
||
from pathlib import Path | ||
from typing import TYPE_CHECKING | ||
|
||
from poetry.utils.env import SystemEnv | ||
|
||
|
||
if TYPE_CHECKING: | ||
from pytest_mock import MockerFixture | ||
|
||
|
||
def test_get_marker_env_untagged_cpython(mocker: MockerFixture) -> None: | ||
mocker.patch("platform.python_version", return_value="3.11.9+") | ||
env = SystemEnv(Path(sys.prefix)) | ||
marker_env = env.get_marker_env() | ||
assert marker_env["python_full_version"] == "3.11.9" |