adamchainz/django-capture-on-commit-callbacks

Mixin classmethod support

jheld opened this issue · 1 comments

jheld commented

I do consider this minor, but what are your thoughts on support for the mixin to be able to run it's lightweight wrapper also when running for instance in setUpClass, setUpTestData. More broadly @classmethod. Codewise, it probably wouldn't look "great" in the repo (double the functions with no "real" difference).

I only bring this up because the mixin is nice to have but in order to support class and instance, you would have to either import/use both, or only use the function.

Emphasizing that this is simply for developer friendliness, and quite minor.

It's fair enough that it would be a classmethod, enabling (probably very rare) use in setUpClass etc. There's no duplication required - instance methods can call class methods. Fixed in #5.