Merge pull request #9320 from ThomasWaldmann/windows-fixes-master
Some checks are pending
Lint / lint (push) Waiting to run
CI / lint (push) Waiting to run
CI / security (push) Waiting to run
CI / asan_ubsan (push) Blocked by required conditions
CI / native_tests (push) Blocked by required conditions
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Blocked by required conditions
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Blocked by required conditions
CI / vm_tests (OmniOS, false, omnios, r151056) (push) Blocked by required conditions
CI / vm_tests (OpenBSD, false, openbsd, 7.7) (push) Blocked by required conditions
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Blocked by required conditions
CI / windows_tests (push) Blocked by required conditions
CodeQL / Analyze (push) Waiting to run

cygwin: skip ~root base dir test
This commit is contained in:
TW 2026-02-13 23:53:16 +01:00 committed by GitHub
commit 632893ba36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,7 @@ from ...helpers.fs import (
make_path_safe,
map_chars,
)
from ...platform import is_win32, is_darwin, is_haiku
from ...platform import is_win32, is_darwin, is_haiku, is_cygwin
from .. import are_hardlinks_supported
from .. import rejected_dotdot_paths
@ -34,7 +34,7 @@ def test_get_base_dir(monkeypatch):
monkeypatch.delenv("USER", raising=False)
assert get_base_dir(legacy=True) == os.path.expanduser("~")
# Haiku OS is a single-user OS, expanding "~root" is not supported.
if not is_haiku:
if not (is_haiku or is_cygwin):
monkeypatch.setenv("USER", "root")
assert get_base_dir(legacy=True) == os.path.expanduser("~root")
monkeypatch.setenv("HOME", "/var/tmp/home")