A pytest plugin for testing Cookiecutter templates. It provides a `cookies` fixture that wraps the Cookiecutter API for generating projects, making it easy to verify templates work as expected. Current version 0.7.0 supports Python >=3.7 and Cookiecutter >=2.1.0. Releases are infrequent but stable.
pip install pytest-cookiesVerified import paths — ran on the pinned version, not inferred.
Basic test for a Cookiecutter template using the cookies fixture.
Replace result.project with result.project_path (returns pathlib.Path).
Upgrade pytest-cookies to >=0.7.0.
Run pytest with --keep-baked-projects flag to inspect generated files.
Install with pip install pytest-cookies and ensure the test file uses the 'cookies' fixture, not direct imports.
Use result.project_path instead.
Check that the template path exists and Cookiecutter is properly configured.