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