nestorsalceda / mamba

The definitive testing tool for Python. Born under the banner of Behavior Driven Development (BDD).
http://nestorsalceda.github.io/mamba
MIT License
518 stars 65 forks source link

Example Collector: Use class/function attributes instead of encoding information in name #112

Closed kfischer-okarin closed 6 years ago

kfischer-okarin commented 6 years ago

I added a little decorator that can be used by the node transformer to add arbitrary attributes to the generated functions and classes.

Using this decorator I moved all the relevant information about the generated examples and groups into attributes of the class/function instead of encoding it in the name.

The introduced attributes are:

kfischer-okarin commented 6 years ago

Oh, seems the build failed for pypy. I have to look into that later....

kfischer-okarin commented 6 years ago

Seems the pypy compile function is very strict about not specified line arguments of Expressions

nestorsalceda commented 6 years ago

Woah!!

That's an awesome work!

Thanks for contributing, it will land in next release :)