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?
https://github.com/hackebrot/pytest-cookies
The pytest plugin for your Cookiecutter templates 🍪
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With