Closed jaap3 closed 2 years ago
Perfect! This will be verry good contribution. I already merged #536. You can open another PR with the switch to pytest.
I just have few recommendations.
@raises(...)
with with pytest.raises(...)
to put inside the with
scope only the last line. This way we can benefit from pytest and improve the tests to be more accurate what exactly they test.something not in some_list
instead of not something in some_list
. This is more pythonic way of checking if something is inside collection. If the format that you used is explicitly needed by pytest (I'm no so familiar) then leave it like that.Thank you for your work on making django-imagekit better!
I've created PR #538 which includes your suggestions
The current test suite uses django-nose. Nose has been unmaintained for a long time, and has stopped working in Python 3.10.
After some research it seems that switching to pytest is the best option. I have a branch where nose is replaced by pytest, you can see the results here: https://github.com/leukeleu/django-imagekit/pull/2
This is based on the GitHub actions branch (PR #536).