Пример #1
0
def test_hg_find_repo(hg_repo_path):
    path = str(hg_repo_path)
    assert path == detect_repository.find_repo_root(path)
Пример #2
0
def test_fail_find_repo():
    path = "/non/existing/path"
    assert detect_repository.find_repo_root(path) is None
Пример #3
0
def test_git_find_repo(git_repo_path):
    path = str(git_repo_path)
    assert path == detect_repository.find_repo_root(path)
    subdir = git_repo_path / "test_dir"
    subdir.mkdir()
    assert path == detect_repository.find_repo_root(str(subdir))