Files
cibuildwheel/unit_test/dependency_constraints_test.py
T

18 lines
949 B
Python
Raw Normal View History

2020-06-18 02:00:30 +02:00
from pathlib import Path
2021-01-06 13:50:58 -05:00
from cibuildwheel.util import DependencyConstraints
2020-02-15 11:57:31 +00:00
def test_defaults():
dependency_constraints = DependencyConstraints.with_defaults()
2020-06-18 02:00:30 +02:00
project_root = Path(__file__).parents[1]
resources_dir = project_root / 'cibuildwheel' / 'resources'
2020-06-18 02:00:30 +02:00
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')
2020-06-18 02:00:30 +02:00
assert dependency_constraints.get_for_python_version('3.6').samefile(resources_dir / 'constraints-python36.txt')
assert dependency_constraints.get_for_python_version('3.5').samefile(resources_dir / 'constraints-python35.txt')
assert dependency_constraints.get_for_python_version('2.7').samefile(resources_dir / 'constraints-python27.txt')