]> granicus.if.org Git - python/commitdiff
os.geteuid() may not be available...
authorCharles-François Natali <neologix@free.fr>
Tue, 4 Oct 2011 21:35:47 +0000 (23:35 +0200)
committerCharles-François Natali <neologix@free.fr>
Tue, 4 Oct 2011 21:35:47 +0000 (23:35 +0200)
Lib/test/test_import.py

index f74556f9806240af667be7bbdba1c8380107acf8..7c540327fcdb41c48d3967aca757e34b86b5f3ab 100644 (file)
@@ -547,7 +547,7 @@ class PycacheTests(unittest.TestCase):
 
     @unittest.skipUnless(os.name == 'posix',
                          "test meaningful only on posix systems")
-    @unittest.skipIf(os.geteuid() == 0,
+    @unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,
             "due to varying filesystem permission semantics (issue #11956)")
     def test_unwritable_directory(self):
         # When the umask causes the new __pycache__ directory to be