mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-26 09:47:58 +00:00
test_config_dir_compat: don't test on win32
there is no old borg < 2.0 there anyway.
This commit is contained in:
parent
bde0f11e1e
commit
499e5133b5
1 changed files with 4 additions and 2 deletions
|
@ -633,14 +633,16 @@ def test_get_config_dir(monkeypatch):
|
|||
def test_get_config_dir_compat(monkeypatch):
|
||||
"""test that it works the same for legacy and for non-legacy implementation"""
|
||||
monkeypatch.delenv("BORG_BASE_DIR", raising=False)
|
||||
if not is_darwin:
|
||||
if not is_darwin and not is_win32:
|
||||
monkeypatch.delenv("BORG_CONFIG_DIR", raising=False)
|
||||
monkeypatch.delenv("XDG_CONFIG_HOME", raising=False)
|
||||
# fails on macOS: assert '/Users/tw/Library/Preferences/borg' == '/Users/tw/.config/borg'
|
||||
# fails on win2 MSYS2 (but we do not need legacy compat there).
|
||||
assert get_config_dir(legacy=False) == get_config_dir(legacy=True)
|
||||
if not is_darwin:
|
||||
if not is_darwin and not is_win32:
|
||||
monkeypatch.setenv("XDG_CONFIG_HOME", "/var/tmp/.config1")
|
||||
# fails on macOS: assert '/Users/tw/Library/Preferences/borg' == '/var/tmp/.config1/borg'
|
||||
# fails on win2 MSYS2 (but we do not need legacy compat there).
|
||||
assert get_config_dir(legacy=False) == get_config_dir(legacy=True)
|
||||
monkeypatch.setenv("BORG_CONFIG_DIR", "/var/tmp/.config2")
|
||||
assert get_config_dir(legacy=False) == get_config_dir(legacy=True)
|
||||
|
|
Loading…
Reference in a new issue