[Python-checkins] python/dist/src/Lib/test test_shutil.py, 1.10, 1.10.2.1

jlgijsbers at users.sourceforge.net jlgijsbers at users.sourceforge.net
Mon Dec 6 22:22:21 CET 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27633

Modified Files:
      Tag: release24-maint
	test_shutil.py 
Log Message:
Backport of fix for SF bug #1076467: don't run test_on_error as root, as
the permission errors don't get provoked that way.


Index: test_shutil.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_shutil.py,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -d -r1.10 -r1.10.2.1
--- test_shutil.py	23 Nov 2004 09:27:27 -0000	1.10
+++ test_shutil.py	6 Dec 2004 21:22:17 -0000	1.10.2.1
@@ -16,7 +16,8 @@
         filename = tempfile.mktemp()
         self.assertRaises(OSError, shutil.rmtree, filename)
 
-    if hasattr(os, 'chmod') and sys.platform[:6] != 'cygwin':
+    if (hasattr(os, 'chmod') and sys.platform[:6] != 'cygwin'
+        and os.getenv('USER') != 'root'):
         def test_on_error(self):
             self.errorState = 0
             os.mkdir(TESTFN)



More information about the Python-checkins mailing list