예제 #1
0
def test_sys_config_dirs():
    """Test that the sys config directories are returned correctly."""
    if "XDG_CONFIG_DIRS" in os.environ:
        del os.environ["XDG_CONFIG_DIRS"]
    config_dirs = get_system_config_dirs(APP_NAME, APP_AUTHOR)
    assert isinstance(config_dirs, list)
    assert config_dirs[0].endswith(APP_NAME) or config_dirs[0].endswith(
        _pathify(APP_NAME))
예제 #2
0
def test_mac_system_config_dirs_no_xdg():
    """Test that macOS returns the system config directories without XDG."""
    config_dirs = get_system_config_dirs(APP_NAME, APP_AUTHOR, force_xdg=False)
    assert isinstance(config_dirs, list)
    assert config_dirs[0].endswith(APP_NAME)
    assert "Library" in config_dirs[0]