Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite failing with Pillow 7.2.0 #108

Open
cript0nauta opened this issue Aug 29, 2020 · 0 comments
Open

Test suite failing with Pillow 7.2.0 #108

cript0nauta opened this issue Aug 29, 2020 · 0 comments

Comments

@cript0nauta
Copy link

If I run piexif tests with Pillow 7.2.0, they fail:

======================================================================
ERROR: test_load (s_test.ExifTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/s_test.py", line 110, in test_load
    self._compare_piexifDict_PILDict(exif, e, p=False)
  File "./tests/s_test.py", line 614, in _compare_piexifDict_PILDict
    self._compare_value(zeroth_ifd[key], pilDict[key])
  File "./tests/s_test.py", line 585, in _compare_value
    self.assertEqual(pack_byte(*v1), v2)
  File "./tests/s_test.py", line 87, in pack_byte
    return struct.pack("B" * len(args), *args)
struct.error: ubyte format requires 0 <= number <= 255

======================================================================
ERROR: test_load_m (s_test.ExifTests)
'load' on memory.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/s_test.py", line 118, in test_load_m
    self._compare_piexifDict_PILDict(exif, e)
  File "./tests/s_test.py", line 614, in _compare_piexifDict_PILDict
    self._compare_value(zeroth_ifd[key], pilDict[key])
  File "./tests/s_test.py", line 585, in _compare_value
    self.assertEqual(pack_byte(*v1), v2)
  File "./tests/s_test.py", line 87, in pack_byte
    return struct.pack("B" * len(args), *args)
struct.error: ubyte format requires 0 <= number <= 255

======================================================================
ERROR: test_load_unicode_filename (s_test.ExifTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/s_test.py", line 186, in test_load_unicode_filename
    self._compare_piexifDict_PILDict(exif, e, p=False)
  File "./tests/s_test.py", line 614, in _compare_piexifDict_PILDict
    self._compare_value(zeroth_ifd[key], pilDict[key])
  File "./tests/s_test.py", line 585, in _compare_value
    self.assertEqual(pack_byte(*v1), v2)
  File "./tests/s_test.py", line 87, in pack_byte
    return struct.pack("B" * len(args), *args)
struct.error: ubyte format requires 0 <= number <= 255

----------------------------------------------------------------------

With Pillow 7.1.2, it works ok. I did some bisecting and noted that this Pillow commit is responsible for breaking piexif tests: python-pillow/Pillow@ccac9e1.

I'm not sure whether this is a bug on Pillow, in piexif or in the tests.

I noted this bug because piexif fails to build with the Nix package manager because their tests fail.

algitbot pushed a commit to alpinelinux/aports that referenced this issue Apr 5, 2021
tests are broken with recent pillow
hMatoba/Piexif#108
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant