cookiecutters are template generators that are massively useful in generating projects in a range of languages. However, I was wondering if there's a way to consistently test them? I want to generate not only the final product (make assertions about the existence, name and content of the target files given a set of inputs) but also that the generation will run without errors with certain inputs but reject others. What's the best approach for this? I know I could write a simple test case but it would not have access to the command line inputs, would it? Is there any way to access that function and feed it the command line options as args?
Automated testing for cookiecutters
Asked Answered
https://github.com/hackebrot/pytest-cookies
The pytest plugin for your Cookiecutter templates 🍪
looks like it's not maintained anymore –
Ricercar
© 2022 - 2024 — McMap. All rights reserved.