kjaymiller/cookiecutter-relecloud

Unable to test new checks for imports

Open

#77 opened on 2023年8月10日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)CSS (5 forks)github user discovery
help wantedtests

Repository metrics

Stars
 (7 stars)
PR merge metrics
 (PR metrics pending)

説明

in tests/test_cookie_cutter_generation. I have the following test that is not actually capturing the desired test.

@pytest.mark.skip(reason="unable to check with caplog but tested in functional test - issue #1")
def test_project_post_hook_triggers_warning_if_linters_not_installed(
    cookies_session, context, mocker, caplog
    ):
    """If ruff or black is not installed, the post hook should trigger a warning"""

    mocker.patch("hooks.post_gen_project.importlib.util.find_spec", return_value=None)

    with caplog.at_level("WARNING"):
        cookies_session.bake(extra_context=context)

コントリビューターガイド