[Python-checkins] r87418 - python/branches/py3k/Lib/test/test_compileall.py
r.david.murray
python-checkins at python.org
Tue Dec 21 19:24:33 CET 2010
Author: r.david.murray
Date: Tue Dec 21 19:24:33 2010
New Revision: 87418
Log:
Make test_compileall more robust by using -S to keep sys.path minimized.
Try this again, hopefully the right way this time.
Arfrever Taifersar Arahesis reported that test_compileall failed during Gentoo
install because it was tyring to write .pyc files to a read-only system
directory during test_no_args_compiles_path. Having the tests call python
with -S should eliminate the system directories from the path.
Modified:
python/branches/py3k/Lib/test/test_compileall.py
Modified: python/branches/py3k/Lib/test/test_compileall.py
==============================================================================
--- python/branches/py3k/Lib/test/test_compileall.py (original)
+++ python/branches/py3k/Lib/test/test_compileall.py Tue Dec 21 19:24:33 2010
@@ -126,13 +126,13 @@
def assertRunOK(self, *args, **env_vars):
rc, out, err = script_helper.assert_python_ok(
- '-m', 'compileall', *args, **env_vars)
+ '-S', '-m', 'compileall', *args, **env_vars)
self.assertEqual(b'', err)
return out
def assertRunNotOK(self, *args, **env_vars):
rc, out, err = script_helper.assert_python_failure(
- '-m', 'compileall', *args, **env_vars)
+ '-S', '-m', 'compileall', *args, **env_vars)
return rc, out, err
def assertCompiled(self, fn):
More information about the Python-checkins
mailing list