style: apply black via pre-commit run -a
This commit is contained in:
committed by
Henry Schreiner
parent
9cbed6a9be
commit
178aaea6c7
+20
-11
@@ -12,7 +12,9 @@ subdir_package_project.files['src/spam/spam.c'] = jinja2.Template(SPAM_C_TEMPLAT
|
||||
subdir_package_project.template_context['spam_c_top_level_add'] = ''
|
||||
subdir_package_project.template_context['spam_c_function_add'] = ''
|
||||
|
||||
subdir_package_project.files['src/spam/setup.py'] = r'''
|
||||
subdir_package_project.files[
|
||||
'src/spam/setup.py'
|
||||
] = r'''
|
||||
from setuptools import Extension, setup
|
||||
|
||||
setup(
|
||||
@@ -22,11 +24,15 @@ setup(
|
||||
)
|
||||
'''
|
||||
|
||||
subdir_package_project.files['src/spam/test/run_tests.py'] = r'''
|
||||
subdir_package_project.files[
|
||||
'src/spam/test/run_tests.py'
|
||||
] = r'''
|
||||
print('run_tests.py executed!')
|
||||
'''
|
||||
|
||||
subdir_package_project.files['bin/before_build.py'] = r'''
|
||||
subdir_package_project.files[
|
||||
'bin/before_build.py'
|
||||
] = r'''
|
||||
print('before_build.py executed!')
|
||||
'''
|
||||
|
||||
@@ -37,16 +43,19 @@ def test(capfd, tmp_path):
|
||||
|
||||
package_dir = Path('src', 'spam')
|
||||
# build the wheels
|
||||
actual_wheels = utils.cibuildwheel_run(project_dir, package_dir=package_dir, add_env={
|
||||
'CIBW_BEFORE_BUILD': 'python {project}/bin/before_build.py',
|
||||
'CIBW_TEST_COMMAND': 'python {package}/test/run_tests.py',
|
||||
# this shouldn't depend on the version of python, so build only CPython 3.6
|
||||
'CIBW_BUILD': 'cp36-*',
|
||||
})
|
||||
actual_wheels = utils.cibuildwheel_run(
|
||||
project_dir,
|
||||
package_dir=package_dir,
|
||||
add_env={
|
||||
'CIBW_BEFORE_BUILD': 'python {project}/bin/before_build.py',
|
||||
'CIBW_TEST_COMMAND': 'python {package}/test/run_tests.py',
|
||||
# this shouldn't depend on the version of python, so build only CPython 3.6
|
||||
'CIBW_BUILD': 'cp36-*',
|
||||
},
|
||||
)
|
||||
|
||||
# check that the expected wheels are produced
|
||||
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0')
|
||||
if 'cp36' in w]
|
||||
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0') if 'cp36' in w]
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
captured = capfd.readouterr()
|
||||
|
||||
Reference in New Issue
Block a user