Kaydet (Commit) 6b220b03 authored tarafından Johannes Gijsbers's avatar Johannes Gijsbers

Use os.geteuid() for checking whether we are root, as suggested by

Michael Hudson.
üst eb68be46
......@@ -19,7 +19,7 @@ class TestShutil(unittest.TestCase):
# See bug #1071513 for why we don't run this on cygwin
# and bug #1076467 for why we don't run this as root.
if (hasattr(os, 'chmod') and sys.platform[:6] != 'cygwin'
and os.getenv('USER') != 'root'):
and not (hasattr(os, 'geteuid') and os.geteuid() == 0)):
def test_on_error(self):
self.errorState = 0
os.mkdir(TESTFN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment