Skip to content

Commit 76d4a43

Browse files
[3.14] gh-127146: Emscripten: Set umask to zero in python.sh (GH-136740) (#136745)
Clears the umask used during a test of pydoc.apropos when testing on Emscripten. This is to work around a known issue in Emscripten; but it's not clear if the chmod call that is causing the problem is actually testing anything of significance. (cherry picked from commit 22af5d3) Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
1 parent 2ce2071 commit 76d4a43

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test_pydoc/test_pydoc.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,6 +1303,11 @@ def test_apropos_with_unreadable_dir(self):
13031303
@os_helper.skip_unless_working_chmod
13041304
def test_apropos_empty_doc(self):
13051305
pkgdir = os.path.join(TESTFN, 'walkpkg')
1306+
if support.is_emscripten:
1307+
# Emscripten's readdir implementation is buggy on directories
1308+
# with read permission but no execute permission.
1309+
old_umask = os.umask(0)
1310+
self.addCleanup(os.umask, old_umask)
13061311
os.mkdir(pkgdir)
13071312
self.addCleanup(rmtree, pkgdir)
13081313
init_path = os.path.join(pkgdir, '__init__.py')

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy