From 499e5133b5d5c9bf1fb1c9556663e359e446a096 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 4 Feb 2023 01:18:16 +0100 Subject: [PATCH] test_config_dir_compat: don't test on win32 there is no old borg < 2.0 there anyway. --- src/borg/testsuite/helpers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/borg/testsuite/helpers.py b/src/borg/testsuite/helpers.py index 7a237484e..a6771e377 100644 --- a/src/borg/testsuite/helpers.py +++ b/src/borg/testsuite/helpers.py @@ -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)