Neaten the environment modification using triple-quotes and dict.update

This commit is contained in:
Joe Rickerby
2019-04-22 23:23:49 +01:00
parent 857aafbd3f
commit 9050137d2b
5 changed files with 23 additions and 13 deletions
+7 -5
View File
@@ -6,11 +6,13 @@ def test():
project_dir = os.path.dirname(__file__)
# set up the environment
env = os.environ.copy()
env['CIBW_TEST_REQUIRES'] = 'nose'
# the 'false ||' bit is to ensure this command runs in a shell on
# mac/linux.
env['CIBW_TEST_COMMAND'] = 'false || nosetests {project}/test'
env['CIBW_TEST_COMMAND_WINDOWS'] = 'nosetests {project}/test'
env.update({
'CIBW_TEST_REQUIRES': 'nose',
# the 'false ||' bit is to ensure this command runs in a shell on
# mac/linux.
'CIBW_TEST_COMMAND': 'false || nosetests {project}/test',
'CIBW_TEST_COMMAND_WINDOWS': 'nosetests {project}/test',
})
# build & test the wheels
subprocess.check_call([sys.executable, '-m', 'cibuildwheel', project_dir], env=env)