mirror of
https://github.com/borgbackup/borg.git
synced 2025-12-18 15:46:20 -05:00
improve fs_test
This commit is contained in:
parent
6be6b1d942
commit
dcdc91c1cc
2 changed files with 3 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ Public APIs are documented in platform.base.
|
|||
|
||||
from types import ModuleType
|
||||
|
||||
from ..platformflags import is_win32, is_linux, is_freebsd, is_netbsd, is_darwin, is_cygwin
|
||||
from ..platformflags import is_win32, is_linux, is_freebsd, is_netbsd, is_darwin, is_cygwin, is_haiku
|
||||
|
||||
from .base import ENOATTR, API_VERSION
|
||||
from .base import SaveFile, sync_dir, fdatasync, safe_fadvise
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ from ...helpers.fs import (
|
|||
remove_dotdot_prefixes,
|
||||
make_path_safe,
|
||||
)
|
||||
from ...platform import is_win32, is_darwin
|
||||
from ...platform import is_win32, is_darwin, is_haiku
|
||||
from .. import are_hardlinks_supported
|
||||
from .. import rejected_dotdot_paths
|
||||
|
||||
|
|
@ -33,7 +33,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 sys.platform.startswith("haiku"):
|
||||
if not is_haiku:
|
||||
monkeypatch.setenv("USER", "root")
|
||||
assert get_base_dir(legacy=True) == os.path.expanduser("~root")
|
||||
monkeypatch.setenv("HOME", "/var/tmp/home")
|
||||
|
|
|
|||
Loading…
Reference in a new issue