Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_invalid_cookiecutter_repository():
assert isinstance(exceptions.InvalidCookiecutterRepository(), exceptions.CruftError)
def test_unable_to_find_cookiecutter_template_path():
instance = exceptions.UnableToFindCookiecutterTemplate(Path("."))
assert instance.directory == "."
assert isinstance(instance, exceptions.CruftError)
def test_create_auto_invalid_repo(test_case, tmpdir):
tmpdir.chdir()
with pytest.raises(exceptions.InvalidCookiecutterRepository):
test_case()
def test_check_examples(project_dir):
with pytest.raises(exceptions.NoCruftFound):
verify_and_test_examples(api.check)
os.chdir(project_dir)
verify_and_test_examples(api.check)