style: activate string normalization

This commit is contained in:
Henry Schreiner
2021-05-03 13:12:36 -04:00
committed by Henry Schreiner
parent d1900f6a05
commit bda76b21cb
54 changed files with 1598 additions and 1599 deletions
+14 -14
View File
@@ -7,45 +7,45 @@ from . import test_projects, utils
project_with_a_test = test_projects.new_c_project()
project_with_a_test.files[
'test/spam_test.py'
] = r'''
"test/spam_test.py"
] = r"""
import spam
def test_spam():
assert spam.system('python -c "exit(0)"') == 0
assert spam.system('python -c "exit(1)"') != 0
'''
"""
@pytest.mark.emulation
def test(tmp_path):
project_dir = tmp_path / 'project'
project_dir = tmp_path / "project"
project_with_a_test.generate(project_dir)
# build and test the wheels
actual_wheels = utils.cibuildwheel_run(
project_dir,
add_env={
'CIBW_TEST_REQUIRES': 'pytest',
'CIBW_TEST_COMMAND': 'pytest {project}/test',
'CIBW_ARCHS': 'aarch64 ppc64le s390x',
"CIBW_TEST_REQUIRES": "pytest",
"CIBW_TEST_COMMAND": "pytest {project}/test",
"CIBW_ARCHS": "aarch64 ppc64le s390x",
},
)
# also check that we got the right wheels
expected_wheels = (
utils.expected_wheels('spam', '0.1.0', machine_arch='aarch64')
+ utils.expected_wheels('spam', '0.1.0', machine_arch='ppc64le')
+ utils.expected_wheels('spam', '0.1.0', machine_arch='s390x')
utils.expected_wheels("spam", "0.1.0", machine_arch="aarch64")
+ utils.expected_wheels("spam", "0.1.0", machine_arch="ppc64le")
+ utils.expected_wheels("spam", "0.1.0", machine_arch="s390x")
)
assert set(actual_wheels) == set(expected_wheels)
def test_setting_arch_on_other_platforms(tmp_path, capfd):
if utils.platform == 'linux':
pytest.skip('this test checks the behaviour on platforms other than linux')
if utils.platform == "linux":
pytest.skip("this test checks the behaviour on platforms other than linux")
project_dir = tmp_path / 'project'
project_dir = tmp_path / "project"
project_with_a_test.generate(project_dir)
# build and test the wheels
@@ -53,7 +53,7 @@ def test_setting_arch_on_other_platforms(tmp_path, capfd):
utils.cibuildwheel_run(
project_dir,
add_env={
'CIBW_ARCHS': 'aarch64',
"CIBW_ARCHS": "aarch64",
},
)