Skip to content

Fix tests for Item Image thumbnails

Andy Summers requested to merge item-image-thumb-tests into master

This PR fixes another test suite, ItemImageThumbTest. These fixes were primarily due to Python 2 and 3's differing handling of bytes versus strings, but also had a fun gotcha: a few of the assertions in these tests exploited the fact that Python 2's / operator performed integer division, which drops the remainder. Several tests were failing asserting that 2.0 == 2.027027..., which succeeded with Python 2 because of the dropped remained. These assertions now use the // operator, which is the Python 3 way of performing integer division (and this is noted in comments in the tests).

Please review: @NUWAN.KUMARASIRI @TREFILEK @bjsousa

Edited by Andy Summers

Merge request reports

Loading