[py23_test] pass the sys.path as PYTHONPATH to python subprocess
Apparently I need to do that, or the child python process does not see fontTools in the path. Another workaround woud be to ensure that fontTools is installed, at least in editable or develop mode (via `pip install -e .`). But the way we temporarily extend the PYTHONPATH in run-test.sh is less intrusive.
This commit is contained in:
parent
3495029726
commit
4874264dd9
@ -37,7 +37,8 @@ class OpenFuncWrapperTest(unittest.TestCase):
|
||||
with open(datafile, 'rb') as infile, \
|
||||
tempfile.NamedTemporaryFile(delete=False) as outfile:
|
||||
check_call(
|
||||
[sys.executable, script], stdin=infile, stdout=outfile)
|
||||
[sys.executable, script], stdin=infile, stdout=outfile,
|
||||
env={"PYTHONPATH": ":".join(sys.path)})
|
||||
result = not filecmp.cmp(infile.name, outfile.name, shallow=False)
|
||||
finally:
|
||||
os.remove(script)
|
||||
|
Loading…
x
Reference in New Issue
Block a user