Automated testing for cookiecutters
Asked Answered
P

1

10

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?

Paviour answered 20/10, 2018 at 12:0 Comment(0)
L
10

https://github.com/hackebrot/pytest-cookies

The pytest plugin for your Cookiecutter templates 🍪

Lientery answered 30/12, 2019 at 15:42 Comment(1)
looks like it's not maintained anymoreRicercar

© 2022 - 2024 — McMap. All rights reserved.