diff --git a/test/02_test/cibuildwheel_test.py b/test/02_test/cibuildwheel_test.py index 9ec4fa56..e70b0172 100644 --- a/test/02_test/cibuildwheel_test.py +++ b/test/02_test/cibuildwheel_test.py @@ -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) diff --git a/test/03_before_build/cibuildwheel_test.py b/test/03_before_build/cibuildwheel_test.py index 5ce69243..cbf902b4 100644 --- a/test/03_before_build/cibuildwheel_test.py +++ b/test/03_before_build/cibuildwheel_test.py @@ -8,8 +8,10 @@ def test(): env = os.environ.copy() # write python version information to a temporary file, this is checked # in setup.py - env['CIBW_BEFORE_BUILD'] = "python -c \"import sys; open('/tmp/pythonversion.txt', 'w').write(sys.version)\" && python -c \"import sys; open('/tmp/pythonexecutable.txt', 'w').write(sys.executable)\"" - env['CIBW_BEFORE_BUILD_WINDOWS'] = "python -c \"import sys; open('c:\\pythonversion.txt', 'w').write(sys.version)\" && python -c \"import sys; open('c:\\pythonexecutable.txt', 'w').write(sys.executable)\"" + env.update({ + 'CIBW_BEFORE_BUILD': '''python -c "import sys; open('/tmp/pythonversion.txt', 'w').write(sys.version)" && python -c "import sys; open('/tmp/pythonexecutable.txt', 'w').write(sys.executable)"''', + 'CIBW_BEFORE_BUILD_WINDOWS': '''python -c "import sys; open('c:\\pythonversion.txt', 'w').write(sys.version)" && python -c "import sys; open('c:\\pythonexecutable.txt', 'w').write(sys.executable)"''', + }) # build the wheels subprocess.check_call([sys.executable, '-m', 'cibuildwheel', project_dir], env=env) diff --git a/test/04_build_skip/cibuildwheel_test.py b/test/04_build_skip/cibuildwheel_test.py index db8d4e9a..961d6e2d 100644 --- a/test/04_build_skip/cibuildwheel_test.py +++ b/test/04_build_skip/cibuildwheel_test.py @@ -7,8 +7,10 @@ def test(): # set up the environment env = os.environ.copy() - env['CIBW_BUILD'] = 'cp3?-*' - env['CIBW_SKIP'] = 'cp34-*' + env.update({ + 'CIBW_BUILD': 'cp3?-*', + 'CIBW_SKIP': 'cp34-*', + }) # build the wheels subprocess.check_call([sys.executable, '-m', 'cibuildwheel', project_dir], env=env) diff --git a/test/05_environment/cibuildwheel_test.py b/test/05_environment/cibuildwheel_test.py index 7a707d91..78e43482 100644 --- a/test/05_environment/cibuildwheel_test.py +++ b/test/05_environment/cibuildwheel_test.py @@ -10,8 +10,10 @@ def test(): # write some information into the CIBW_ENVIRONMENT, for expansion and # insertion into the environment by cibuildwheel. This is checked # in setup.py - env['CIBW_ENVIRONMENT'] = 'CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo \'test string 3\')" PATH=$PATH:/opt/cibw_test_path' - env['CIBW_ENVIRONMENT_WINDOWS'] = 'CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo \'test string 3\')" PATH="$PATH;/opt/cibw_test_path"' + env.update({ + 'CIBW_ENVIRONMENT': '''CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo 'test string 3')" PATH=$PATH:/opt/cibw_test_path''', + 'CIBW_ENVIRONMENT_WINDOWS': '''CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo 'test string 3')" PATH="$PATH;/opt/cibw_test_path"''', + }) # build the wheels subprocess.check_call([sys.executable, '-m', 'cibuildwheel', project_dir], env=env) diff --git a/test/06_docker_images/cibuildwheel_test.py b/test/06_docker_images/cibuildwheel_test.py index de65c0e6..7d326806 100644 --- a/test/06_docker_images/cibuildwheel_test.py +++ b/test/06_docker_images/cibuildwheel_test.py @@ -11,8 +11,10 @@ def test(): env = os.environ.copy() # change the docker images to use. The docker image is tested in setup.py # during the build - env['CIBW_MANYLINUX1_X86_64_IMAGE'] = 'dockcross/manylinux-x64' - env['CIBW_MANYLINUX1_I686_IMAGE'] = 'dockcross/manylinux-x86' + env.update({ + 'CIBW_MANYLINUX1_X86_64_IMAGE': 'dockcross/manylinux-x64', + 'CIBW_MANYLINUX1_I686_IMAGE': 'dockcross/manylinux-x86', + }) # build the wheels subprocess.check_call([sys.executable, '-m', 'cibuildwheel', project_dir], env=env)