summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-05-19 15:05:52 (GMT)
committerGitHub <noreply@github.com>2022-05-19 15:05:52 (GMT)
commit7afccd34a659af6676c17abbd431e58093d25746 (patch)
tree24bd5c780dc660b2882019f28260d9bd1d8e8daf /Lib/test/test_os.py
parent611d43c2a49e7c2c35fc03b0f58570b07c41b0eb (diff)
downloadcpython-7afccd34a659af6676c17abbd431e58093d25746.zip
cpython-7afccd34a659af6676c17abbd431e58093d25746.tar.gz
cpython-7afccd34a659af6676c17abbd431e58093d25746.tar.bz2
gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)
(cherry picked from commit 137fd3d88aa46669f5717734e823f4c594ab2843) Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 36ad587..ae07182 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -11,7 +11,6 @@ import fnmatch
import fractions
import itertools
import locale
-import mmap
import os
import pickle
import select
@@ -59,6 +58,10 @@ try:
except ImportError:
INT_MAX = PY_SSIZE_T_MAX = sys.maxsize
+try:
+ import mmap
+except ImportError:
+ mmap = None
from test.support.script_helper import assert_python_ok
from test.support import unix_shell
@@ -2167,7 +2170,8 @@ class TestInvalidFD(unittest.TestCase):
@unittest.skipUnless(hasattr(os, 'fpathconf'), 'test needs os.fpathconf()')
@unittest.skipIf(
- support.is_emscripten, "musl libc issue on Emscripten, bpo-46390"
+ support.is_emscripten or support.is_wasi,
+ "musl libc issue on Emscripten/WASI, bpo-46390"
)
def test_fpathconf(self):
self.check(os.pathconf, "PC_NAME_MAX")
@@ -2460,6 +2464,7 @@ class Win32KillTests(unittest.TestCase):
# os.kill on Windows can take an int which gets set as the exit code
self._kill(100)
+ @unittest.skipIf(mmap is None, "requires mmap")
def _kill_with_event(self, event, name):
tagname = "test_os_%s" % uuid.uuid1()
m = mmap.mmap(-1, 1, tagname)