def test_is_git_repo(tmpfolder): assert not repo.is_git_repo('/a-folder/that-not/exist') newdir = tmpfolder.join('new').ensure_dir() assert not repo.is_git_repo(str(newdir)) newdir.chdir() shell.git('init') tmpfolder.chdir() assert repo.is_git_repo(str(newdir))
def test_is_git_repo(tmpfolder): assert not repo.is_git_repo("/a-folder/that-not/exist") newdir = tmpfolder.join("new").ensure_dir() assert not repo.is_git_repo(str(newdir)) newdir.chdir() shell.git("init") tmpfolder.chdir() assert repo.is_git_repo(str(newdir))