2019-04-23 22:14:17 +01:00
|
|
|
import os
|
2019-04-22 18:22:43 +01:00
|
|
|
import utils
|
|
|
|
|
|
2019-04-23 22:14:17 +01:00
|
|
|
|
|
|
|
|
project_dir = os.path.dirname(__file__)
|
|
|
|
|
|
2019-04-22 18:22:43 +01:00
|
|
|
def test():
|
|
|
|
|
# build the wheels
|
2019-04-23 22:14:17 +01:00
|
|
|
utils.cibuildwheel_run(project_dir)
|
2019-04-22 18:22:43 +01:00
|
|
|
|
2019-04-23 22:14:17 +01:00
|
|
|
# check that the expected wheels are produced
|
|
|
|
|
expected_wheels = utils.expected_wheels('spam', '0.1.0')
|
|
|
|
|
actual_wheels = os.listdir('wheelhouse')
|
|
|
|
|
assert set(actual_wheels) == set(expected_wheels)
|
2019-04-22 18:22:43 +01:00
|
|
|
|
|
|
|
|
|
2019-04-23 22:14:17 +01:00
|
|
|
def test_build_identifiers():
|
|
|
|
|
# check that the number of expected wheels matches the number of build
|
2019-04-22 18:22:43 +01:00
|
|
|
# identifiers
|
2019-09-16 12:48:15 +02:00
|
|
|
# after adding CIBW_MANYLINUX_IMAGE to support manylinux2010, there
|
|
|
|
|
# can be multiple wheels for each wheel, though, so we need to limit
|
|
|
|
|
# the expected wheels
|
2019-10-16 00:30:17 +02:00
|
|
|
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0')
|
|
|
|
|
if not '-manylinux' in w or '-manylinux1' in w]
|
2019-04-23 22:14:17 +01:00
|
|
|
build_identifiers = utils.cibuildwheel_get_build_identifiers(project_dir)
|
|
|
|
|
assert len(expected_wheels) == len(build_identifiers)
|