[Python-checkins]
python/dist/src/Lib/test test_shutil.py, 1.10.2.1, 1.10.2.2
jlgijsbers at users.sourceforge.net
jlgijsbers at users.sourceforge.net
Sun Dec 12 16:54:22 CET 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9249
Modified Files:
Tag: release24-maint
test_shutil.py
Log Message:
Backport from trunk: 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.10.2.1
retrieving revision 1.10.2.2
diff -u -d -r1.10.2.1 -r1.10.2.2
--- test_shutil.py 6 Dec 2004 21:22:17 -0000 1.10.2.1
+++ test_shutil.py 12 Dec 2004 15:54:20 -0000 1.10.2.2
@@ -17,7 +17,7 @@
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)
More information about the Python-checkins
mailing list