def METHOD_NAME(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