From 5081e78efde901556398615eb477c63c836686e5 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 8 Mar 2022 13:17:30 +0200 Subject: bpo-40280: Block more non-working syscalls in Emscripten (GH-31757) - getgroups always fails. - geteuid and getegid always return 0 (root), which confuse tarfile and tests. - hardlinks (link, linkat) always fails. - non-encodable file names are not supported by NODERAWFS layer. - mark more tests with dependency on subprocess and multiprocessing. Mocking does not work if the module fails to import. --- Lib/test/support/os_helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/test/support/os_helper.py') diff --git a/Lib/test/support/os_helper.py b/Lib/test/support/os_helper.py index c761d7bd3d..eee37ef0d5 100644 --- a/Lib/test/support/os_helper.py +++ b/Lib/test/support/os_helper.py @@ -49,8 +49,8 @@ if os.name == 'nt': 'encoding (%s). Unicode filename tests may not be effective' % (TESTFN_UNENCODABLE, sys.getfilesystemencoding())) TESTFN_UNENCODABLE = None -# Mac OS X denies unencodable filenames (invalid utf-8) -elif sys.platform != 'darwin': +# macOS and Emscripten deny unencodable filenames (invalid utf-8) +elif sys.platform not in {'darwin', 'emscripten'}: try: # ascii and utf-8 cannot encode the byte 0xff b'\xff'.decode(sys.getfilesystemencoding()) -- cgit v1.2.1