GH-100479: Fix pathlib test failure on WASI (#104215)

This commit is contained in:
Barney Gale 2023-05-07 17:54:40 +01:00 committed by GitHub
parent 7a7eaff95c
commit 60f588478f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View 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():