Move the pythonpath fiddling to the test runner

instead of including it in every test
This commit is contained in:
Joe Rickerby
2019-04-22 23:13:34 +01:00
parent 8b632bcb6d
commit 857aafbd3f
9 changed files with 27 additions and 19 deletions
+2 -3
View File
@@ -1,11 +1,10 @@
import subprocess, sys, os
from glob import glob
project_dir = os.path.dirname(__file__)
sys.path.append(os.path.join(os.path.dirname(project_dir), 'shared'))
import utils
def test():
project_dir = os.path.dirname(__file__)
# build the wheels
subprocess.check_call([sys.executable, '-m', 'cibuildwheel', project_dir])
+1 -3
View File
@@ -1,11 +1,9 @@
import subprocess, sys, os
from glob import glob
project_dir = os.path.dirname(__file__)
sys.path.append(os.path.join(os.path.dirname(project_dir), 'shared'))
import utils
def test():
project_dir = os.path.dirname(__file__)
# set up the environment
env = os.environ.copy()
env['CIBW_TEST_REQUIRES'] = 'nose'
+1 -3
View File
@@ -1,11 +1,9 @@
import subprocess, sys, os
from glob import glob
project_dir = os.path.dirname(__file__)
sys.path.append(os.path.join(os.path.dirname(project_dir), 'shared'))
import utils
def test():
project_dir = os.path.dirname(__file__)
# set up the environment
env = os.environ.copy()
# write python version information to a temporary file, this is checked
+2 -3
View File
@@ -1,11 +1,10 @@
import subprocess, sys, os
from glob import glob
project_dir = os.path.dirname(__file__)
sys.path.append(os.path.join(os.path.dirname(project_dir), 'shared'))
import utils
def test():
project_dir = os.path.dirname(__file__)
# set up the environment
env = os.environ.copy()
env['CIBW_BUILD'] = 'cp3?-*'
+2 -2
View File
@@ -1,10 +1,10 @@
import subprocess, sys, os
from glob import glob
project_dir = os.path.dirname(__file__)
sys.path.append(os.path.join(os.path.dirname(project_dir), 'shared'))
import utils
def test():
project_dir = os.path.dirname(__file__)
# set up the environment
env = os.environ.copy()
# write some information into the CIBW_ENVIRONMENT, for expansion and
+1 -2
View File
@@ -1,10 +1,9 @@
import subprocess, sys, os, pytest
from glob import glob
project_dir = os.path.dirname(__file__)
sys.path.append(os.path.join(os.path.dirname(project_dir), 'shared'))
import utils
def test():
project_dir = os.path.dirname(__file__)
if not sys.platform.startswith('linux'):
pytest.skip('the docker test is only relevant to the linux build')
+1 -2
View File
@@ -1,10 +1,9 @@
import subprocess, sys, os
from glob import glob
project_dir = os.path.dirname(__file__)
sys.path.append(os.path.join(os.path.dirname(project_dir), 'shared'))
import utils
def test():
project_dir = os.path.dirname(__file__)
# this test checks that SSL is working in the build environment using
# some checks in setup.py.
+6
View File
@@ -1,3 +1,9 @@
'''
Utility functions used by the cibuildwheel tests.
This file is added to the PYTHONPATH in the test runner at bin/run_test.py.
'''
import subprocess, sys
def cibuildwheel_get_build_identifiers(project_path, env=None):