<@UN194UPA4> What does pitfall provide over the re...
# python
@mysterious-egg-7415 What does pitfall provide over the regular pulumi integration testing method: https://www.pulumi.com/blog/testing-your-infrastructure-as-code-with-pulumi/#a-basic-integration-test Is the goal to keep everything in python and avoid golang?
💯 1
When I initially assessed Pulumi, I wanted to write my infrastructure code in Go, however the features lagged behind TypeScript/Python. So I decided to use Python instead and came across the official integration testing library. I ran into challenges with it such as no support for installing Python packages (see: https://github.com/pulumi/pulumi/issues/1252) and it broke how I mapped my Pulumi components/modules to Python packages. Then I thought, if I'm writing my infrastructure code in Python, why can't I test it in Python? Thus, the primary driver behind the pitfall project is to provide a means for Pulumi's Python users to test their code in Python.
pitfall is more similar to terratest: https://github.com/gruntwork-io/terratest
Cool, can we pytest as test framework?
Also have you built anything production with pulumi python? I've been using typescript and would rather switch to python but last time I checked it was fairly far behind.
You can use pitfall with whichever Python test framework you like. The examples are just in unittest. If you'd like to contribute an example that uses pytest, I'd happily merge it 🙂
If you're already using TypeScript, I would not encourage changing to Python just because new features typically land in TypeScript first.