Open tony opened 5 years ago
Sounds good. I am wracking my brain trying to figure out what the purpose of this fixture is. It came from a PR from @tomd-aptivate a couple years ago. @tony do you know?
@miracle2k I'm not using pytest+django-assets at the same time, so I can't tell for sure, the original usage of it was to make sure django-assets didn't lose settings (apparently): https://github.com/miracle2k/django-assets/commit/435264eb704ebf1adbfb5d04b4e0e6eceb5c30f0#diff-2188999a0e7833c3726f2360cadccb1a / #33
History: https://github.com/miracle2k/django-assets/commits/master/django_assets/pytest_plugin.py
I am using django-assets on a multi-framework codebase where some tests won't require django.
What will happen is this:
In my case, django-assets is being pulled in with all pytest tests, since it's
autouse=True
and attempting to access the settings singleton.I'm thinking about what the best option would be to handle this - I think the best option would be to hold off
autouse=True
and let the user add the fixture where and when they need it.