Example #1
0
def test_config_no_home(monkeypatch):
    monkeypatch.setattr('os.environ', {})
    assert xdg_basedir.user_config('jnrbase') == '/.config/jnrbase'
Example #2
0
def test_config_no_home():
    with patch_env(clear=True):
        expect(xdg_basedir.user_config('jnrbase')) == '/.config/jnrbase'
Example #3
0
def test_config_no_args(monkeypatch):
    monkeypatch.setenv('XDG_CONFIG_HOME', '~/.xdg/config')
    assert '/.xdg/config/jnrbase' in xdg_basedir.user_config('jnrbase')
Example #4
0
def test_config_no_args():
    with patch_env({'XDG_CONFIG_HOME': '~/.xdg/config'}):
        expect(xdg_basedir.user_config('jnrbase')).contains(
            '/.xdg/config/jnrbase'
        )