Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as

root (directory permissions are ignored).
This commit is contained in:
Charles-François Natali 2011-10-04 19:17:26 +02:00
parent 36225c6a99
commit a13b1faa78
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,7 @@ from importlib.test.import_ import test_relative_imports
from importlib.test.import_ import util as importlib_util from importlib.test.import_ import util as importlib_util
import marshal import marshal
import os import os
import platform
import py_compile import py_compile
import random import random
import stat import stat
@ -546,6 +547,8 @@ class PycacheTests(unittest.TestCase):
@unittest.skipUnless(os.name == 'posix', @unittest.skipUnless(os.name == 'posix',
"test meaningful only on posix systems") "test meaningful only on posix systems")
@unittest.skipIf(platform.system() == 'FreeBSD' and os.geteuid() == 0,
"due to non-standard filesystem permission semantics (issue #11956)")
def test_unwritable_directory(self): def test_unwritable_directory(self):
# When the umask causes the new __pycache__ directory to be # When the umask causes the new __pycache__ directory to be
# unwritable, the import still succeeds but no .pyc file is written. # unwritable, the import still succeeds but no .pyc file is written.