瀏覽代碼

test_config_dir_compat: don't test on win32

there is no old borg < 2.0 there anyway.
Thomas Waldmann 2 年之前
父節點
當前提交
499e5133b5
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/borg/testsuite/helpers.py

+ 4 - 2
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)