style: apply black via pre-commit run -a

This commit is contained in:
Henry Schreiner
2021-05-03 13:12:36 -04:00
committed by Henry Schreiner
parent 9cbed6a9be
commit 178aaea6c7
53 changed files with 1479 additions and 714 deletions
+14 -6
View File
@@ -7,7 +7,8 @@ from . import test_projects, utils
# TODO: specify these at runtime according to manylinux_image
project_with_manylinux_symbols = test_projects.new_c_project(
spam_c_top_level_add=textwrap.dedent(r'''
spam_c_top_level_add=textwrap.dedent(
r'''
#include <malloc.h>
#include <stdlib.h>
#include <stdint.h>
@@ -20,8 +21,10 @@ project_with_manylinux_symbols = test_projects.new_c_project(
#if !__GLIBC_PREREQ(2, 5) /* manylinux1 is glibc 2.5 */
#error "Must run on a glibc >= 2.5 linux environment"
#endif
'''),
spam_c_function_add=textwrap.dedent(r'''
'''
),
spam_c_function_add=textwrap.dedent(
r'''
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 24)
// nextupf is only available in manylinux_2_24+
sts = (int)nextupf(0.0F);
@@ -32,11 +35,14 @@ project_with_manylinux_symbols = test_projects.new_c_project(
// malloc_info is only available on manylinux2010+
sts = malloc_info(0, stdout);
#endif
'''),
'''
),
)
@pytest.mark.parametrize('manylinux_image', ['manylinux1', 'manylinux2010', 'manylinux2014', 'manylinux_2_24'])
@pytest.mark.parametrize(
'manylinux_image', ['manylinux1', 'manylinux2010', 'manylinux2014', 'manylinux_2_24']
)
def test(manylinux_image, tmp_path):
if utils.platform != 'linux':
pytest.skip('the docker test is only relevant to the linux build')
@@ -68,7 +74,9 @@ def test(manylinux_image, tmp_path):
add_env['CIBW_SKIP'] = 'cp27* pp*'
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0', manylinux_versions=[manylinux_image])]
expected_wheels = [
w for w in utils.expected_wheels('spam', '0.1.0', manylinux_versions=[manylinux_image])
]
if manylinux_image in {'manylinux2014', 'manylinux_2_24'}:
expected_wheels = [w for w in expected_wheels if '-cp27' not in w]
if manylinux_image in {'manylinux1', 'manylinux2014', 'manylinux_2_24'}: