summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2011-10-04 17:19:21 (GMT)
committerCharles-François Natali <neologix@free.fr>2011-10-04 17:19:21 (GMT)
commite39b112aea32cf79d5cef8476d92b7ff74a12059 (patch)
tree29f70e25eb2aedbac5e01afb56f1905883e1032e /Lib/test
parenta9860aeb08fce7494a963746c04102d23f1cf4ac (diff)
parenta13b1faa788f95f063a2190eb63d81ee8565182d (diff)
downloadcpython-e39b112aea32cf79d5cef8476d92b7ff74a12059.zip
cpython-e39b112aea32cf79d5cef8476d92b7ff74a12059.tar.gz
cpython-e39b112aea32cf79d5cef8476d92b7ff74a12059.tar.bz2
Issue #11956: Skip test_import.test_unwritable_directory on FreeBSD when run as
root (directory permissions are ignored).
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_import.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index 6cbd218..d852c0b 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -4,6 +4,7 @@ from importlib.test.import_ import test_relative_imports
from importlib.test.import_ import util as importlib_util
import marshal
import os
+import platform
import py_compile
import random
import stat
@@ -544,6 +545,8 @@ class PycacheTests(unittest.TestCase):
@unittest.skipUnless(os.name == 'posix',
"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):
# When the umask causes the new __pycache__ directory to be
# unwritable, the import still succeeds but no .pyc file is written.