def test_repo_create(repo): repo.path.rmdir() assert not repo.path.exists() Repository(repo.path, repo.homedir) assert repo.path.exists() assert repo.path.is_dir()
def test_repo_params(repo, remove_leading_dot, ignore_patterns): _repo = Repository(repo.path, remove_leading_dot=remove_leading_dot, ignore_patterns=ignore_patterns, homedir=repo.homedir) assert _repo.path == repo.path assert _repo.homedir == repo.homedir assert _repo.remove_leading_dot == remove_leading_dot assert _repo.ignore_patterns == ignore_patterns
def test_repo_create(repo): repo.path.remove() assert repo.path.check(exists=0) Repository(repo.path, repo.homedir) assert repo.path.check(exists=1, dir=1)
def test_nested_name_to_target(repo, home): r = Repository(repo, home) actual = r._name_to_target(home.join('.vim/.mrconfig')) expected = repo.join('.vim/.mrconfig') assert actual == expected
def repo(request, tmpdir): path = str(tmpdir.ensure_dir('repo')) home = str(tmpdir.ensure_dir(request.param)) return Repository(path, home)
def repo(request, tmpdir): path = tmpdir.ensure_dir('repo') home = tmpdir.ensure_dir(request.param) return Repository(path, homedir=home)