Add unit test case and fix filename confusion

This commit is contained in:
Joe Rickerby
2020-02-02 17:46:12 +00:00
parent b9607ffae7
commit baa0897f1d
3 changed files with 22 additions and 30 deletions
+21
View File
@@ -0,0 +1,21 @@
from cibuildwheel.util import DependencyConstraints
import os
def test_defaults():
dependency_constraints = DependencyConstraints.with_defaults()
project_root = os.path.dirname(os.path.dirname(__file__))
resources_dir = os.path.join(project_root, 'cibuildwheel', 'resources')
assert os.path.samefile(
dependency_constraints.base_file_path,
os.path.join(resources_dir, 'constraints.txt')
)
assert os.path.samefile(
dependency_constraints.get_for_python_version('3.8'),
os.path.join(resources_dir, 'constraints.txt')
)
assert os.path.samefile(
dependency_constraints.get_for_python_version('2.7'),
os.path.join(resources_dir, 'constraints-python27.txt')
)