Skip to content

Commit 9abe583

Browse files
committed
add a test
1 parent c809239 commit 9abe583

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/validate_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import zipfile
44

55
import pytest
6+
from packaging.specifiers import SpecifierSet
67
from packaging.tags import parse_tag
78

89
import validate
@@ -87,3 +88,10 @@ def test_top_imports_record(tmp_path):
8788

8889
expected = ["distlib", "_distlib_backend", "distlib_top"]
8990
assert validate._top_imports(str(whl)) == expected
91+
92+
93+
def test_pythons_to_check_with_python_versions_constraint():
94+
tag = parse_tag("py2.py3-none-any")
95+
constraint = SpecifierSet(">=3.12")
96+
ret = validate._pythons_to_check(tag, constraint)
97+
assert ret == ("python3.12", "python3.13")

0 commit comments

Comments
 (0)