]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-100479: Fix pathlib test failure on WASI (#104215)
authorBarney Gale <barney.gale@gmail.com>
Sun, 7 May 2023 16:54:40 +0000 (17:54 +0100)
committerGitHub <noreply@github.com>
Sun, 7 May 2023 16:54:40 +0000 (17:54 +0100)
Lib/test/test_pathlib.py

index 7586610833b063f4c1c0babba83b79efec9de3f5..e25c77f2ba8af61f2fc6ba6fbd9b25002715f660 100644 (file)
@@ -1655,7 +1655,8 @@ class _BasePathTest(object):
         p = P(BASE, session_id=42)
         self.assertEqual(42, p.absolute().session_id)
         self.assertEqual(42, p.resolve().session_id)
-        self.assertEqual(42, p.with_segments('~').expanduser().session_id)
+        if not is_wasi:  # WASI has no user accounts.
+            self.assertEqual(42, p.with_segments('~').expanduser().session_id)
         self.assertEqual(42, (p / 'fileA').rename(p / 'fileB').session_id)
         self.assertEqual(42, (p / 'fileB').replace(p / 'fileA').session_id)
         if os_helper.can_symlink():