#172: remove os.access usage
-----------------------+----------------------------------------------------
Reporter: Ramereth | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 0.4.5
Component: pkgcore | Version: 0.4.4
Resolution: | Keywords:
-----------------------+----------------------------------------------------
Comment (by Ramereth):
For documentation sake, here's the output of the test case:
{{{
======================================================================
FAIL: test_find_binary (pkgcore.test.test_spawn.SpawnTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/snakeoil/test/__init__.py", line
171, in run
self.forced_extra_frame(testMethod)
File "/usr/lib/python2.4/site-packages/snakeoil/test/__init__.py", line
140, in forced_extra_frame
test()
File "/tmp/pkgcore-0.4.5/pkgcore/test/test_spawn.py", line 43, in
test_find_binary
self.assertRaises(spawn.CommandNotFound, spawn.find_binary,
script_name)
AssertionError: CommandNotFound not raised
----------------------------------------------------------------------
}}}
And as a simple test:
{{{
root@poplar / # touch foon; chmod 0640 foon; python -c 'import os;print
os.access("foon", os.X_OK)'
True
root@poplar / # ls -l foon
-rw-r----- 1 root 101 0 Apr 21 17:06 foon
}}}
So something is lying :-)
--
Ticket URL: <
http://www.pkgcore.org/trac/pkgcore/ticket/172#comment:1>