[Python-checkins] python/dist/src/Lib/test test_shutil.py, 1.11,
1.12
jlgijsbers at users.sourceforge.net
jlgijsbers at users.sourceforge.net
Sun Dec 12 16:53:01 CET 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8951
Modified Files:
test_shutil.py
Log Message:
Use os.geteuid() for checking whether we are root, as suggested by
Michael Hudson.
Index: test_shutil.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_shutil.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- test_shutil.py 6 Dec 2004 20:50:15 -0000 1.11
+++ test_shutil.py 12 Dec 2004 15:52:57 -0000 1.12
@@ -19,7 +19,7 @@
# 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)
More information about the Python-checkins
mailing list