Exemplo n.º 1
0
 def test_should_not_use_xdg_config_home_if_not_set(self):
     assert default_config_dirs() == ['/home/user/.config/randrctl']
Exemplo n.º 2
0
def complete_profiles(prefix, parsed_args, **kwargs):
    return (profile for profile in potential_profiles(context.default_config_dirs()) if profile.startswith(prefix))
Exemplo n.º 3
0
 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'
     ]
Exemplo n.º 4
0
 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'
     ]
Exemplo n.º 5
0
 def test_should_not_use_xdg_config_home_if_not_set(self):
     assert default_config_dirs() == ['/home/user/.config/randrctl']
Exemplo n.º 6
0
 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']
Exemplo n.º 7
0
 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']