kjaymiller/cookiecutter-relecloud
View on GitHubUnable to test new checks for imports
Open
#77 opened on Aug 10, 2023
help wantedtests
Repository metrics
- Stars
- (7 stars)
- PR merge metrics
- (PR metrics pending)
Description
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)