diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-08 11:38:48 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-08 11:38:48 -0700 |
commit | 523687478457fde13b02503711131e91970f4c9d (patch) | |
tree | ff2a50be8c599f5ddf98880c065c9d1334b01d28 | |
parent | a84eeb759243ba81abf874126ded9c8517edb20d (diff) | |
download | portage-523687478457fde13b02503711131e91970f4c9d.tar.gz portage-523687478457fde13b02503711131e91970f4c9d.tar.bz2 portage-523687478457fde13b02503711131e91970f4c9d.zip |
Make LazyImportPortageBaselineTestCase do a sys.path insert since
PYTHONPATH apparently isn't strong enough to fix the buildbot.
-rw-r--r-- | pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py | 13 |
1 files changed, 9 insertions, 4 deletions
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() |