]> granicus.if.org Git - python/commitdiff
Issue 19384: Fix test_py_compile for root user, patch by Claudiu Popa.
authorChristian Heimes <christian@cheimes.de>
Fri, 25 Oct 2013 07:21:51 +0000 (09:21 +0200)
committerChristian Heimes <christian@cheimes.de>
Fri, 25 Oct 2013 07:21:51 +0000 (09:21 +0200)
Lib/test/test_py_compile.py
Misc/NEWS

index 2ad9c3a0002aa26029ea82b24e39326bc70dba0a..154c08a6a2e481dd2b60d4f97d875f8cd20eee93 100644 (file)
@@ -3,6 +3,7 @@ import os
 import py_compile
 import shutil
 import stat
+import sys
 import tempfile
 import unittest
 
@@ -75,6 +76,8 @@ class PyCompileTests(unittest.TestCase):
         self.assertTrue(os.path.exists(self.pyc_path))
         self.assertFalse(os.path.exists(self.cache_path))
 
+    @unittest.skipIf(hasattr(os, 'geteuid') and os.geteuid() == 0,
+                     'non-root user required')
     @unittest.skipIf(os.name == 'nt',
                      'cannot control directory permissions on Windows')
     def test_exceptions_propagate(self):
index 2323d88115934004972ff23817db85c0faf2ba98..5f6ccad7521cccf343e2b7aca7f8c6c112c36cbf 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -74,6 +74,11 @@ Library
 
 - Issue #17087: Improved the repr for regular expression match objects.
 
+Tests
+-----
+
+- Issue 19384: Fix test_py_compile for root user, patch by Claudiu Popa.
+
 Build
 -----