196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 | |
def test_sysfind_no_permisson(self): |
dir = py.test.ensuretemp('sysfind') |
env = py.std.os.environ |
oldpath = env['PATH'] |
try: |
noperm = dir.ensure('noperm', dir=True) |
env['PATH'] += ":%s" % (noperm) |
noperm.chmod(0) |
assert py.path.local.sysfind('a') is None |
|
finally: |
env['PATH'] = oldpath |
noperm.chmod(0644) |
-> noperm.remove() | |