Exemplo n.º 1
0
 def test_repo(self):
     for tmp_dir, repo, pathfunc in parameterize():
         if repo is None:
             self.assertTrue(fio.get_repo(pathfunc(tmp_dir)) is None)
         else:
             self.assertIsInstance(fio.get_repo(pathfunc(tmp_dir)),
                                   git.Repo)
Exemplo n.º 2
0
 def test_repo(self):
     for tmp_dir, repo, pathfunc in parameterize():
         if repo is None:
             self.assertTrue(fio.get_repo(pathfunc(tmp_dir)) is None)
         else:
             self.assertIsInstance(
                 fio.get_repo(pathfunc(tmp_dir)), git.Repo
             )
Exemplo n.º 3
0
 def test_repo(self):
     for tmp_dir, repo, pathfunc in parameterize():
         if repo is None:
             self.assertTrue(fio.get_repo(pathfunc(tmp_dir)) is None)
         else:
             self.assertIsInstance(
                 fio.get_repo(pathfunc(tmp_dir)), git.Repo
             )
             possible_repo_subdir = os.path.join(
                 tmp_dir,
                 "".join(
                     "%s%s"
                     % (x, os.path.sep if random.random() > 0.5 else "")
                     for x in string.ascii_lowercase
                 ),
             )
             os.makedirs(possible_repo_subdir)
             assert fio.get_repo_root(possible_repo_subdir) == tmp_dir