diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-05-25 14:24:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-25 14:24:32 (GMT) |
commit | 0fb70ce19197e97b6254ecd2c12f6e8c5b07ef5b (patch) | |
tree | 7a8c89eb2070243c1454749fdcb4cbbd77b973db /Lib/test/test_os.py | |
parent | 307dacd651356d7318d5330b98794560329cf5e2 (diff) | |
download | cpython-0fb70ce19197e97b6254ecd2c12f6e8c5b07ef5b.zip cpython-0fb70ce19197e97b6254ecd2c12f6e8c5b07ef5b.tar.gz cpython-0fb70ce19197e97b6254ecd2c12f6e8c5b07ef5b.tar.bz2 |
gh-90473: Misc test fixes for WASI (GH-93218)
* ``sys.executable`` is not set
* WASI does not support subprocess
* ``pwd`` module is not available
* WASI checks ``open`` syscall flags more strict, needs r, w, rw flag.
* ``umask`` is not available
* ``/dev/null`` may not be accessible
(cherry picked from commit 1f134e96ba994bea3aaea533d4a558df3c5cc3c0)
Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index ae07182..009bb5a 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -1765,6 +1765,7 @@ class RemoveDirsTests(unittest.TestCase): self.assertTrue(os.path.exists(os_helper.TESTFN)) +@unittest.skipIf(support.is_wasi, "WASI has no /dev/null") class DevNullTests(unittest.TestCase): def test_devnull(self): with open(os.devnull, 'wb', 0) as f: @@ -2111,6 +2112,7 @@ class Win32ErrorTests(unittest.TestCase): self.assertRaises(OSError, os.chmod, os_helper.TESTFN, 0) +@unittest.skipIf(support.is_wasi, "Cannot create invalid FD on WASI.") class TestInvalidFD(unittest.TestCase): singles = ["fchdir", "dup", "fdatasync", "fstat", "fstatvfs", "fsync", "tcgetpgrp", "ttyname"] |