-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metaprogramming Mamba? #111
Comments
Hey! I'm not sure about this, I perform several AST transformations before executing any code. Anyway, I should think a bit more about parametrized tests, because there are more people asking for it. Thanks! |
Discovered this interesting project today and doing a spike. Right now I loop inside my
And in the spec
Now when you run the specs in documentation mode, you get something like
In addition to being my own naive implementation, this code also suffers from the fact that mamba stops on the first error, so if all my imaginary validators are broken, I'll have to fix them one by one, instead of getting a pretty list with crosses and checkmarks for each validator. I hope @nestorsalceda comes up with something nice. Mamba feels so satisfyingly familiar when coming from RSpec. |
Is it somehow possible to DRY up ones specs and generate dynamic examples using an approach like shown in https://chris-lamb.co.uk/posts/generating-dynamic-python-tests-using-metaclasses for unittest? Or is there even a simpler way to do it? If there is not, there really should be one :-)
The text was updated successfully, but these errors were encountered: