2020-06-18 02:00:30 +02:00
|
|
|
from pathlib import Path
|
2020-02-02 17:39:18 +00:00
|
|
|
|
2021-01-06 13:50:58 -05:00
|
|
|
from cibuildwheel.util import DependencyConstraints
|
|
|
|
|
|
2020-02-15 11:57:31 +00:00
|
|
|
|
2020-02-02 17:39:18 +00:00
|
|
|
def test_defaults():
|
|
|
|
|
dependency_constraints = DependencyConstraints.with_defaults()
|
|
|
|
|
|
2020-06-18 02:00:30 +02:00
|
|
|
project_root = Path(__file__).parents[1]
|
2021-05-03 11:45:43 -04:00
|
|
|
resources_dir = project_root / "cibuildwheel" / "resources"
|
2020-02-02 17:39:18 +00:00
|
|
|
|
2021-05-03 11:45:43 -04: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"
|
2021-04-30 17:56:34 -04:00
|
|
|
)
|
2021-05-03 11:45:43 -04:00
|
|
|
assert dependency_constraints.get_for_python_version("3.9").samefile(
|
|
|
|
|
resources_dir / "constraints-python39.txt"
|
2021-04-30 17:56:34 -04:00
|
|
|
)
|
2021-05-03 11:45:43 -04:00
|
|
|
assert dependency_constraints.get_for_python_version("3.6").samefile(
|
|
|
|
|
resources_dir / "constraints-python36.txt"
|
2021-04-30 17:56:34 -04:00
|
|
|
)
|