示例#1
0
def test_is_git_repo_throws():
    with pytest.raises(git.git.exc.NoSuchPathError):
        git.is_git_repo("dummy_dir")
示例#2
0
def test_is_git_repo_true(mock_git):
    mock_repo = mock.Mock()
    mock_git.Repo = mock_repo
    git.is_git_repo("dummy_dir")
    assert 1 == mock_git.Repo.call_count
    mock_git.Repo.assert_called_once_with("dummy_dir")