Files
cibuildwheel/unit_test/dependency_constraints_test.py
T
Matthieu Darbois b605f8fec8 chore: refactor cibuildwheel.utils (#2252)
* chore: refactor cibuildwheel.utils

* rework build_frontend extra flags

* ci(fix): use tonistiigi/binfmt:qemu-v8.1.5 image for qemu
2025-01-27 14:35:56 -05:00

24 lines
803 B
Python

from __future__ import annotations
from pathlib import Path
from cibuildwheel.util.packaging import DependencyConstraints
def test_defaults():
dependency_constraints = DependencyConstraints.with_defaults()
project_root = Path(__file__).parents[1]
resources_dir = project_root / "cibuildwheel" / "resources"
assert dependency_constraints.base_file_path.samefile(resources_dir / "constraints.txt")
assert dependency_constraints.get_for_python_version("3.99").samefile(
resources_dir / "constraints.txt"
)
assert dependency_constraints.get_for_python_version("3.9").samefile(
resources_dir / "constraints-python39.txt"
)
assert dependency_constraints.get_for_python_version("3.6").samefile(
resources_dir / "constraints-python36.txt"
)