예제 #1
0
 def test_search_paths_not_created(self, expanduser, get_config_var):
     expanduser.return_value = self.tmpdir
     get_config_var.return_value = self.tmpdir
     runner = Runner()
     cwd = os.path.dirname(os.path.abspath(__file__))
     self.assertEquals(runner.search_paths(),
                       [os.path.join(cwd, 'modules')])
예제 #2
0
 def test_search_paths(self, isdir):
     isdir.return_value = True
     runner = Runner()
     cwd = os.path.dirname(os.path.abspath(foo.__file__))
     _cwd = os.path.join(cwd, 'modules')
     _user = os.path.join(os.path.expanduser('~'), '.local', 'libexec',
                          'foo-tools')
     _egg = os.path.join(cwd, 'libexec', 'foo-tools')
     _global = os.path.join(sysconfig.get_config_var('base'), 'libexec',
                            'foo-tools')
     self.assertEquals(runner.search_paths(), [_user, _cwd, _egg, _global])