From: Zac Medico Date: Wed, 8 Sep 2010 18:38:48 +0000 (-0700) Subject: Make LazyImportPortageBaselineTestCase do a sys.path insert since X-Git-Tag: v2.2_rc78~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=523687478457fde13b02503711131e91970f4c9d;p=portage.git Make LazyImportPortageBaselineTestCase do a sys.path insert since PYTHONPATH apparently isn't strong enough to fix the buildbot. --- diff --git a/pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py b/pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py index 4e480d93f..15086ffbd 100644 --- a/pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py +++ b/pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py @@ -21,10 +21,14 @@ class LazyImportPortageBaselineTestCase(TestCase): 'portage.proxy.objectproxy', 'portage._ensure_encodings', ]) - _baseline_import_cmd = [portage._python_interpreter, '-c', - 'import portage, sys ; ' + \ - 'sys.stdout.write(" ".join(k for k in sys.modules ' + \ - 'if sys.modules[k] is not None))'] + _baseline_import_cmd = [portage._python_interpreter, '-c', ''' +import os +import sys +sys.path.insert(0, os.environ["PORTAGE_PYM_PATH"]) +import portage +sys.stdout.write(" ".join(k for k in sys.modules + if sys.modules[k] is not None)) +'''] def testLazyImportPortageBaseline(self): """ @@ -41,6 +45,7 @@ class LazyImportPortageBaselineTestCase(TestCase): pythonpath = ':' + pythonpath pythonpath = PORTAGE_PYM_PATH + pythonpath env[pythonpath] = pythonpath + env['PORTAGE_PYM_PATH'] = PORTAGE_PYM_PATH scheduler = PollScheduler().sched_iface master_fd, slave_fd = os.pipe()