Commit 935be033 authored by Tres Seaver's avatar Tres Seaver

Fix subprocess-based functest to run correctly under buildout.

parent d5f69194
...@@ -136,11 +136,15 @@ class SerializerFunctestCase(unittest.TestCase): ...@@ -136,11 +136,15 @@ class SerializerFunctestCase(unittest.TestCase):
prep_args = [sys.executable, '-c', prep_args = [sys.executable, '-c',
'from ZODB.tests.testSerialize import _functest_prep; ' 'from ZODB.tests.testSerialize import _functest_prep; '
'_functest_prep("%s")' % fqn] '_functest_prep("%s")' % fqn]
subprocess.check_call(prep_args) # buildout doesn't arrange for the sys.path to be exported,
# so force it ourselves
environ = os.environ.copy()
environ['PYTHONPATH'] = ':'.join(sys.path)
subprocess.check_call(prep_args, env=environ)
load_args = [sys.executable, '-c', load_args = [sys.executable, '-c',
'from ZODB.tests.testSerialize import _functest_load; ' 'from ZODB.tests.testSerialize import _functest_load; '
'_functest_load("%s")' % fqn] '_functest_load("%s")' % fqn]
subprocess.call(load_args) subprocess.call(load_args, env=environ)
def _working_failing_datetimes(): def _working_failing_datetimes():
import datetime import datetime
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment