croach / Flask-Fixtures

A simple library for adding database fixtures for unit tests using nothing but JSON or YAML.
MIT License
63 stars 30 forks source link

setUp function not working when decorating individual methods #6

Open croach opened 10 years ago

croach commented 10 years ago

The user defined setUp function is being called before the fixtures setup when decorating individual methods with the @fixtures decorator.

croach commented 10 years ago

When decorating the class with the @fixtures decorator, all setup and teardown methods are wrapped with a function that calls the fixtures setup/teardown before/after the corresponding function on the test class. When decorating a single method in the class, however, this wrapping never takes place.