mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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.
This commit is contained in:
parent
73a559d0c9
commit
e0436bcb24
1 changed files with 2 additions and 2 deletions
|
@ -126,13 +126,13 @@ class CommandLineTests(unittest.TestCase):
|
|||
|
||||
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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue