From 82ced1139a141fc7b07af668cf53ea7a0eb966a7 Mon Sep 17 00:00:00 2001 From: Johannes Gijsbers Date: Mon, 6 Dec 2004 21:22:17 +0000 Subject: [PATCH] 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. --- Lib/test/test_shutil.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 1db3fc527e4e..0f78ddc5c0df 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) -- 2.47.3