diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-06-06 10:32:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-06 10:32:23 (GMT) |
commit | 20be4a11fe40149876808bafd6fa0876278e591a (patch) | |
tree | b5bc3ee61d84132243b4228b3b183f72235899be /Lib/test/test_os.py | |
parent | a848a9894d2b23386512df875a29c0ff6353e78f (diff) | |
download | cpython-20be4a11fe40149876808bafd6fa0876278e591a.zip cpython-20be4a11fe40149876808bafd6fa0876278e591a.tar.gz cpython-20be4a11fe40149876808bafd6fa0876278e591a.tar.bz2 |
gh-90473: WASI requires proper open(2) flags (GH-93529)
(cherry picked from commit 4c71d22c4f9fdde6f2234e7dc6a862419cd6fd98)
Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index f304c5e..c0321dc 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -3993,7 +3993,7 @@ class PathTConverterTests(unittest.TestCase): ('access', False, (os.F_OK,), None), ('chflags', False, (0,), None), ('lchflags', False, (0,), None), - ('open', False, (0,), getattr(os, 'close', None)), + ('open', False, (os.O_RDONLY,), getattr(os, 'close', None)), ] def test_path_t_converter(self): @@ -4365,6 +4365,7 @@ class TestScandir(unittest.TestCase): st = os.stat(entry.name, dir_fd=fd, follow_symlinks=False) self.assertEqual(entry.stat(follow_symlinks=False), st) + @unittest.skipIf(support.is_wasi, "WASI maps '' to cwd") def test_empty_path(self): self.assertRaises(FileNotFoundError, os.scandir, '') |