Changeset - c7fbf5b5d586
[Not reviewed]
0 3 0
Brett Smith - 4 years ago 2020-04-10 12:24:34
brettcsmith@brettcsmith.org
config: s/XDG_CACHE_DIR/XDG_CACHE_HOME/g

Per the spec.
3 files changed with 10 insertions and 10 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/config.py
Show inline comments
...
 
@@ -81,3 +81,3 @@ class Config:
 
        try:
 
            cache_root = Path(os.environ['XDG_CACHE_DIR'])
 
            cache_root = Path(os.environ['XDG_CACHE_HOME'])
 
        except (KeyError, ValueError):
tests/conftest.py
Show inline comments
...
 
@@ -14,2 +14,2 @@ def clean_environment(tmpdir_factory):
 
    os.environ['HOME'] = str(testutil.test_path('userconfig'))
 
    os.environ['XDG_CACHE_DIR'] = str(tmpdir_factory.mktemp('.cache'))
 
    os.environ['XDG_CACHE_HOME'] = str(tmpdir_factory.mktemp('.cache'))
tests/test_config.py
Show inline comments
...
 
@@ -219,3 +219,3 @@ def test_rt_wrapper_cache_responds_to_external_credential_changes(rt_environ):
 
def test_rt_wrapper_has_cache(tmp_path):
 
    with update_environ(XDG_CACHE_DIR=tmp_path), update_umask(0o002):
 
    with update_environ(XDG_CACHE_HOME=tmp_path), update_umask(0o002):
 
        config = config_mod.Config()
...
 
@@ -231,3 +231,3 @@ def test_rt_wrapper_without_cache(tmp_path):
 
    tmp_path.chmod(0)
 
    with update_environ(XDG_CACHE_DIR=tmp_path):
 
    with update_environ(XDG_CACHE_HOME=tmp_path):
 
        config = config_mod.Config()
...
 
@@ -239,3 +239,3 @@ def test_cache_mkdir(tmp_path):
 
    expected = tmp_path / 'TESTcache'
 
    with update_environ(XDG_CACHE_DIR=tmp_path):
 
    with update_environ(XDG_CACHE_HOME=tmp_path):
 
        config = config_mod.Config()
...
 
@@ -248,3 +248,3 @@ def test_cache_mkdir_parent(tmp_path):
 
    expected = xdg_cache_dir / 'conservancy_beancount'
 
    with update_environ(XDG_CACHE_DIR=xdg_cache_dir):
 
    with update_environ(XDG_CACHE_HOME=xdg_cache_dir):
 
        config = config_mod.Config()
...
 
@@ -256,3 +256,3 @@ def test_cache_mkdir_from_home(tmp_path):
 
    expected = tmp_path / '.cache' / 'TESTcache'
 
    with update_environ(HOME=tmp_path, XDG_CACHE_DIR=None):
 
    with update_environ(HOME=tmp_path, XDG_CACHE_HOME=None):
 
        config = config_mod.Config()
...
 
@@ -265,3 +265,3 @@ def test_cache_mkdir_exists_ok(tmp_path):
 
    expected.mkdir()
 
    with update_environ(XDG_CACHE_DIR=tmp_path):
 
    with update_environ(XDG_CACHE_HOME=tmp_path):
 
        config = config_mod.Config()
...
 
@@ -273,3 +273,3 @@ def test_cache_path_conflict(tmp_path):
 
    extant_path.touch()
 
    with update_environ(XDG_CACHE_DIR=tmp_path):
 
    with update_environ(XDG_CACHE_HOME=tmp_path):
 
        config = config_mod.Config()
...
 
@@ -281,3 +281,3 @@ def test_cache_path_parent_conflict(tmp_path):
 
    (tmp_path / '.cache').touch()
 
    with update_environ(HOME=tmp_path, XDG_CACHE_DIR=None):
 
    with update_environ(HOME=tmp_path, XDG_CACHE_HOME=None):
 
        config = config_mod.Config()
0 comments (0 inline, 0 general)