summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorJohannes Gijsbers <jlg@dds.nl>2004-12-06 21:22:17 (GMT)
committerJohannes Gijsbers <jlg@dds.nl>2004-12-06 21:22:17 (GMT)
commit82ced1139a141fc7b07af668cf53ea7a0eb966a7 (patch)
tree7ae143cafafad2220186522ce020762ab2bc3f83 /Lib/test
parent5a2a08b69c93f90fcf7b805f20192ad7c0064c4f (diff)
downloadcpython-82ced1139a141fc7b07af668cf53ea7a0eb966a7.zip
cpython-82ced1139a141fc7b07af668cf53ea7a0eb966a7.tar.gz
cpython-82ced1139a141fc7b07af668cf53ea7a0eb966a7.tar.bz2
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.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_shutil.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index 1db3fc5..0f78ddc 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -16,7 +16,8 @@ class TestShutil(unittest.TestCase):
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)