def test_should_not_use_xdg_config_home_if_not_set(self): assert default_config_dirs() == ['/home/user/.config/randrctl']
def complete_profiles(prefix, parsed_args, **kwargs): return (profile for profile in potential_profiles(context.default_config_dirs()) if profile.startswith(prefix))
def test_should_expand_nested_vars(self): os.environ['XDG_CONFIG_HOME'] = '$HOME/.xdgconfig' assert default_config_dirs() == [ '/home/user/.xdgconfig/randrctl', '/home/user/.config/randrctl' ]
def test_should_use_xdg_conig_home_if_defined(self): os.environ['XDG_CONFIG_HOME'] = '/home/user/.xdgconfig' assert default_config_dirs() == [ '/home/user/.xdgconfig/randrctl', '/home/user/.config/randrctl' ]
def test_should_expand_nested_vars(self): os.environ['XDG_CONFIG_HOME'] = '$HOME/.xdgconfig' assert default_config_dirs() == ['/home/user/.xdgconfig/randrctl', '/home/user/.config/randrctl']
def test_should_use_xdg_conig_home_if_defined(self): os.environ['XDG_CONFIG_HOME'] = '/home/user/.xdgconfig' assert default_config_dirs() == ['/home/user/.xdgconfig/randrctl', '/home/user/.config/randrctl']