Issue #27322: skip test_compile_path when sys.path is not writeable.

This commit is contained in:
Christian Heimes 2016-09-12 15:08:32 +02:00
parent 6287177169
commit 139652100e
1 changed files with 1 additions and 0 deletions

View File

@ -105,6 +105,7 @@ class CompileallTests(unittest.TestCase):
def test_compile_path(self):
# Exclude Lib/test/ which contains invalid Python files like
# Lib/test/badsyntax_pep3120.py
self._skip_if_sys_path_not_writable()
testdir = os.path.realpath(os.path.dirname(__file__))
if testdir in sys.path:
self.addCleanup(setattr, sys, 'path', sys.path)