cygwin: skip ~root base dir test

This commit is contained in:
Thomas Waldmann 2026-02-13 15:58:40 +01:00
parent 5070066c3b
commit 2b5bca41aa
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

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")