How to use cruft - 10 common examples

To help you get started, we’ve selected a few cruft examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github timothycrosley / cruft / tests / test_api.py View on Github external
@auto_pytest(api.create)
def test_create_auto_invalid_repo(test_case, tmpdir):
    tmpdir.chdir()
    with pytest.raises(exceptions.InvalidCookiecutterRepository):
        test_case()
github timothycrosley / cruft / tests / test_exceptions.py View on Github external
def test_invalid_cookiecutter_repository():
    assert isinstance(exceptions.InvalidCookiecutterRepository(), exceptions.CruftError)
github timothycrosley / cruft / tests / test_exceptions.py View on Github external
def test_unable_to_find_cookiecutter_template_path():
    instance = exceptions.UnableToFindCookiecutterTemplate(Path("."))
    assert instance.directory == "."
    assert isinstance(instance, exceptions.CruftError)
github timothycrosley / cruft / tests / test_api.py View on Github external
def test_create_auto_invalid_repo(test_case, tmpdir):
    tmpdir.chdir()
    with pytest.raises(exceptions.InvalidCookiecutterRepository):
        test_case()
github timothycrosley / cruft / tests / test_exceptions.py View on Github external
def test_no_cruft():
    instance = exceptions.NoCruftFound(".")
    assert instance.directory == "."
    assert isinstance(instance, exceptions.CruftError)
github timothycrosley / cruft / tests / test_api.py View on Github external
def test_update_examples(project_dir, tmpdir):
    tmpdir.chdir()
    with pytest.raises(exceptions.NoCruftFound):
        verify_and_test_examples(api.update)

    os.chdir(project_dir)
    verify_and_test_examples(api.update)
github timothycrosley / cruft / tests / test_exceptions.py View on Github external
def test_unable_to_find_cookiecutter_template():
    instance = exceptions.UnableToFindCookiecutterTemplate(".")
    assert instance.directory == "."
    assert isinstance(instance, exceptions.CruftError)
github timothycrosley / cruft / tests / test_exceptions.py View on Github external
def test_unable_to_find_cookiecutter_template_path():
    instance = exceptions.UnableToFindCookiecutterTemplate(Path("."))
    assert instance.directory == "."
    assert isinstance(instance, exceptions.CruftError)
github timothycrosley / cruft / tests / test_api.py View on Github external
def test_update_examples(project_dir, tmpdir):
    tmpdir.chdir()
    with pytest.raises(exceptions.NoCruftFound):
        verify_and_test_examples(api.update)

    os.chdir(project_dir)
    verify_and_test_examples(api.update)
github timothycrosley / cruft / tests / test_api.py View on Github external
def test_create_examples(tmpdir):
    tmpdir.chdir()
    verify_and_test_examples(api.create)