def test_local_repo_typo(tmpdir):
 template_path = os.path.join('tests', 'unknown-repo')
 with pytest.raises(exceptions.RepositoryNotFound) as err:
  repository.determine_repo_dir(template_path, abbreviations={}, clone_to_dir=str(tmpdir), checkout=None, no_input=True)
 assert (str(err.value) == 'A valid repository for "{}" could not be found in the following locations:\n{}'.format(template_path, '\n'.join([template_path, str((tmpdir / 'tests/unknown-repo'))])))

def test_local_repo_typo ( tmpdir ) : template_path = os . path . join ( 'tests' , 'unknown-repo' ) with pytest . raises ( exceptions . RepositoryNotFound ) as err : repository . determine_repo_dir ( template_path , abbreviations = { } , clone_to_dir = str ( tmpdir ) , checkout = None , no_input = True ) assert ( str ( err . value ) == 'A valid repository for "{}" could not be found in the following locations:\n{}' . format ( template_path , '\n' . join ( [ template_path , str ( ( tmpdir / 'tests/unknown-repo' ) ) ] ) ) )
an unknown local repository should raise a repositorynotfound exception .