コード例 #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))