diff options
author | Johannes Gijsbers <jlg@dds.nl> | 2004-12-12 15:54:20 (GMT) |
---|---|---|
committer | Johannes Gijsbers <jlg@dds.nl> | 2004-12-12 15:54:20 (GMT) |
commit | 4f6394874a2ceaa74407d1fbbf6f9b047f1736ac (patch) | |
tree | 4d1cd4012eb1383f366044fe5f64e09fa76ae6e0 /Lib/test | |
parent | 74b443ce1d6e9fcdc736e7a5fd1bcb7efee042a5 (diff) | |
download | cpython-4f6394874a2ceaa74407d1fbbf6f9b047f1736ac.zip cpython-4f6394874a2ceaa74407d1fbbf6f9b047f1736ac.tar.gz cpython-4f6394874a2ceaa74407d1fbbf6f9b047f1736ac.tar.bz2 |
Backport from trunk: use os.geteuid() for checking whether we are root,
as suggested by Michael Hudson.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_shutil.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 0f78ddc..3d5533a 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -17,7 +17,7 @@ class TestShutil(unittest.TestCase): self.assertRaises(OSError, shutil.rmtree, filename) 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) |