Skip to content

Commit

Permalink
Update tests to handle variations in upstream libraries (#1110)
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey authored Apr 11, 2024
1 parent c7d475e commit 5f2a865
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions tests/test_cli_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,15 @@ def _runTest(self, args):

def test_defaults(self):
img1, img2, img3 = self._runTest([datastore.fetch('Easy1.png')])
assert (hashlib.sha256(img1.convert('L').tobytes()).hexdigest() ==
'd46d8554ba626b8800cb7457d6a8d6c4e6915c75092fd783e0bfa2d4e85c06ec')
assert (hashlib.sha256(img2.convert('L').tobytes()).hexdigest() ==
'c48c3d21b674981ad38b902061b779cda5c605fda5e20a81894051e2a032e736')
assert (hashlib.sha256(img3.convert('L').tobytes()).hexdigest() ==
'479066d2016122b2b60575f4e9abe201b4f79d8a894ce76191419e21c7539186')
assert hashlib.sha256(img1.convert('L').tobytes()).hexdigest() in {
'd46d8554ba626b8800cb7457d6a8d6c4e6915c75092fd783e0bfa2d4e85c06ec',
'0ba7081bd71ca517e2beb96904b333485a93dc3eeab21590cca2bb4ab19b298e',
}
assert hashlib.sha256(img2.convert('L').tobytes()).hexdigest() in {
'c48c3d21b674981ad38b902061b779cda5c605fda5e20a81894051e2a032e736',
'adf0cf7246f395182e326b9798b8134e2ccfd021e607026cc97f2251be9c0f6d',
}
assert hashlib.sha256(img3.convert('L').tobytes()).hexdigest() in {
'479066d2016122b2b60575f4e9abe201b4f79d8a894ce76191419e21c7539186',
'd06317130f4a4aabd155c97f32cec4708ec3eec24d09d16daa2181f18b2051bb',
}

0 comments on commit 5f2a865

Please sign in to comment.