SmileyChris / easy-thumbnails

Easy thumbnails for Django
http://easy-thumbnails.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
1.39k stars 319 forks source link

test_postprocessor and test_postprocessor_fail are failing in 2.10 #652

Open MeggyCal opened 1 day ago

MeggyCal commented 1 day ago

Hi, thank you for this useful library! I was trying to update it, I downloaded the most recent tarball from PyPI and in my environment with Django 5.1 two tests fail:

[   26s] FAIL: test_postprocessor (easy_thumbnails.tests.test_files.FilesTest)
[   26s] use a mock image optimizing post processor doing nothing
[   26s] ----------------------------------------------------------------------
[   26s] Traceback (most recent call last):
[   26s]   File "/home/abuild/rpmbuild/BUILD/easy_thumbnails-2.10/easy_thumbnails/tests/test_files.py", line 223, in test_postprocessor
[   26s]     self.assertEqual(actual[1], 'INFO')
[   26s] AssertionError: 'ERROR' != 'INFO'
[   26s] - ERROR
[   26s] + INFO
[   26s] 
[   26s] 
[   26s] ======================================================================
[   26s] FAIL: test_postprocessor_fail (easy_thumbnails.tests.test_files.FilesTest)
[   26s] use a mock image optimizing post processor doing nothing
[   26s] ----------------------------------------------------------------------
[   26s] Traceback (most recent call last):
[   26s]   File "/home/abuild/rpmbuild/BUILD/easy_thumbnails-2.10/easy_thumbnails/tests/test_files.py", line 242, in test_postprocessor_fail
[   26s]     self.assertRegex(
[   26s] AssertionError: Regex didn't match: '^Command .+returned non-zero exit status 1.*$' not found in "Command 'easy_thumbnails/tests/mockoptim_fail.py /tmp/tmpwqxqiklg' returned non-zero exit status 2."
[   26s] 

The tests fail on pythons 3.10, 311 and 3.12, the same failure appears also with https://github.com/SmileyChris/easy-thumbnails/pull/650 applied on these pythons (I didn't test python 3.13).

Could you please take a look at it?

MeggyCal commented 1 day ago

I just noticed that those are the two tests which should be skipped without optimize. It is installed in my environment, but maybe there is some problem with it.