Skip to content

Commit

Permalink
add one test for python version in "or"
Browse files Browse the repository at this point in the history
  • Loading branch information
lorepirri committed Dec 17, 2024
1 parent 5abdffd commit 602c447
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_py_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,21 @@ def test_poetry_get_constrained_dep_caret_version_python_version_min_max_and_pla
)


def test_poetry_get_constrained_dep_caret_version_python_version_in_or_and_platform():
assert next(
get_constrained_dep(
{
"version": "^1.5",
"python": "<=3.7,!=3.4|>=3.10,!=3.12",
"platform": "darwin",
},
"pandas",
)
) == (
"pandas >=1.5.0,<2.0.0 # [(py<=37 and py!=34 or py>=310 and py!=312) and osx]"
)


def test_poetry_get_constrained_dep_no_version_only_platform():
assert (
next(
Expand Down

0 comments on commit 602c447

Please sign in to comment.