def test_clone_should_raise_if_vcs_not_installed(mocker, clone_dir):
 mocker.patch('cookiecutter.vcs.is_vcs_installed', autospec=True, return_value=False)
 repo_url = 'https://github.com/pytest-dev/cookiecutter-pytest-plugin.git'
 with pytest.raises(exceptions.VCSNotInstalled):
  vcs.clone(repo_url, clone_to_dir=clone_dir)

def test_clone_should_raise_if_vcs_not_installed ( mocker , clone_dir ) : mocker . patch ( 'cookiecutter.vcs.is_vcs_installed' , autospec = True , return_value = False ) repo_url = 'https://github.com/pytest-dev/cookiecutter-pytest-plugin.git' with pytest . raises ( exceptions . VCSNotInstalled ) : vcs . clone ( repo_url , clone_to_dir = clone_dir )
in clone() .