summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_py_compile.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-10-25 07:21:51 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-10-25 07:21:51 (GMT)
commit349b04e902ff90b8ece10396370ed5be9c888a0a (patch)
tree33a67284de73f041743ceafea4db78625f653c4b /Lib/test/test_py_compile.py
parentc4a4b346a6caa46a5df0c9a7adf5c52fe3008d73 (diff)
downloadcpython-349b04e902ff90b8ece10396370ed5be9c888a0a.zip
cpython-349b04e902ff90b8ece10396370ed5be9c888a0a.tar.gz
cpython-349b04e902ff90b8ece10396370ed5be9c888a0a.tar.bz2
Issue 19384: Fix test_py_compile for root user, patch by Claudiu Popa.
Diffstat (limited to 'Lib/test/test_py_compile.py')
-rw-r--r--Lib/test/test_py_compile.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
index 2ad9c3a..154c08a 100644
--- a/Lib/test/test_py_compile.py
+++ b/Lib/test/test_py_compile.py
@@ -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):