Message134600
Trivial fix: please see attached. As to test_pydoc.py, I don't know the system well enough to fiddle with it, but something like this should work (untested):
def test_unreadable_dir(self):
''' pydoc should handle unreadable subdirs gracefully '''
@contextmanager
def mk_unreadable_dir():
top_level_dir = tempfile.mkdtemp()
bad_dir = tempfile.mkdtemp(dir=top_level_dir)
os.chmod(bad_dir, 0)
os.chdir(top_level_dir)
yield
os.removedirs(top_level_dir)
with mk_unreadable_dir():
doc = pydoc.render_doc('modules')
self.assertTrue("modules" in doc) |
|
Date |
User |
Action |
Args |
2011-04-27 17:27:45 | okopnik | set | recipients:
+ okopnik, eric.araujo |
2011-04-27 17:27:45 | okopnik | set | messageid: <1303925265.82.0.276365644012.issue11914@psf.upfronthosting.co.za> |
2011-04-27 17:27:44 | okopnik | link | issue11914 messages |
2011-04-27 17:27:44 | okopnik | create | |
|