diff -up ./test_import.py.11956 ./test_import.py --- ./test_import.py.11956 2011-04-29 11:38:43.000000000 +0100 +++ ./test_import.py 2011-04-29 18:02:42.000000000 +0100 @@ -533,8 +533,8 @@ class PycacheTests(unittest.TestCase): '__pycache__', '{}.{}.py{}'.format( TESTFN, self.tag, __debug__ and 'c' or 'o')))) - @unittest.skipUnless(os.name == 'posix', - "test meaningful only on posix systems") + @unittest.skipUnless( (os.name == 'posix') and not ( os.getuid() == 0 ), + "test meaningful only on posix systems as non-root user") 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.