fix variable name

This commit is contained in:
Yay295 2022-12-15 23:15:38 -06:00 committed by GitHub
parent 07f6951693
commit 5fd014a106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -865,14 +865,14 @@ class TestImage:
@pytest.mark.parametrize("mode", all_modes)
def test_roundtrip_bytes_constructor(self, mode):
source_image = hopper(mode)
source_bytes = image.tobytes()
source_bytes = source_image.tobytes()
copy_image = Image.frombytes(mode, source_image.size, source_bytes)
assert copy_image.tobytes() == source_bytes
@pytest.mark.parametrize("mode", all_modes)
def test_roundtrip_bytes_method(self, mode):
source_image = hopper(mode)
source_bytes = image.tobytes()
source_bytes = source_image.tobytes()
copy_image = Image.new(mode, source_image.size)
copy_image.frombytes(source_bytes)
assert copy_image.tobytes() == source_bytes