➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 pitrou
收信人 pitrou
日期 2008-06-06.14:51:04
SpamBayes Score 8.139662e-05
Marked as misclassified 否
Message-id <1212763867.85.0.395528995267.issue3053@psf.upfronthosting.co.za>
In-reply-to
内容
test_shutil fails with the following error under some AIX 5.3 machine:

======================================================================
FAIL: test_on_error (__main__.TestShutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_shutil.py", line 35, in test_on_error
    shutil.rmtree(TESTFN, onerror=self.check_args_to_onerror)
  File "/qakplus/qa_test/SandBoxes/Antoine/Python-2.5.2/Lib/shutil.py",
line 161, in rmtree
    onerror(os.listdir, path, sys.exc_info())
  File "Lib/test/test_shutil.py", line 49, in check_args_to_onerror
    self.assertEqual(func, os.remove)
AssertionError: <built-in function listdir> != <built-in function remove>


The problem seems to be that the system is stricter with permissions
(please note I don't know AIX at all, and the filesystems are unknown
brands of network filesystems :-)), and @test in that test case is set
to chmod 0400:

$ chmod 400 @test
$ ./python -c "import os; print os.listdir('@test')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
OSError: [Errno 13] Permission denied: '@test'
$ chmod 100 @test
$ ./python -c "import os; print os.listdir('@test')"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
OSError: [Errno 13] Permission denied: '@test'
$ chmod 500 @test
$ ./python -c "import os; print os.listdir('@test')"
['a']


The error was witnessed with Python 2.5.2 but the test case doesn't seem
to have changed in trunk so it should be the same there too.
历史
日期 用户 动作 参数
2008-06-06 14:51:08pitrou修改spambayes_score: 8.13966e-05 -> 8.139662e-05
recipients: + pitrou
2008-06-06 14:51:07pitrou修改spambayes_score: 8.13966e-05 -> 8.13966e-05
messageid: <1212763867.85.0.395528995267.issue3053@psf.upfronthosting.co.za>
2008-06-06 14:51:07pitrou链接issue3053 messages
2008-06-06 14:51:04pitrou创建