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

TST: Uncomment an assert #3053

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from .test_images import image_similarity

filter_inputs = (
# "", '', """""",
string.ascii_lowercase,
string.ascii_uppercase,
string.ascii_letters,
Expand Down Expand Up @@ -76,8 +75,7 @@ def test_flatedecode_unsupported_predictor():
def test_flate_decode_decompress_with_array_params(params):
"""FlateDecode decode() method works correctly with array parameters."""
codec = FlateDecode()
s = ""
s = s.encode()
s = b""
encoded = codec.encode(s)
with pytest.raises(DeprecationError):
assert codec.decode(encoded, params) == s
Expand Down Expand Up @@ -216,7 +214,7 @@ def test_ccitt_get_parameters(parameters, expected_k):
assert parameters.K == expected_k # noqa: SIM300


def test_ccitt_get_parameters__indirect_object():
def test_ccitt_get_parameters_indirect_object():
j-t-1 marked this conversation as resolved.
Show resolved Hide resolved
class Pdf:
def get_object(self, reference) -> NumberObject:
return NumberObject(42)
Expand Down Expand Up @@ -361,7 +359,7 @@ def test_png_transparency_reverse():
data = reader.pages[0].images[0]
_img = Image.open(BytesIO(data.data))
assert ".jp2" in data.name
# assert list(img.getdata()) == list(refimg.getdata())
assert list(_img.getdata()) == list(_refimg.getdata())
j-t-1 marked this conversation as resolved.
Show resolved Hide resolved


@pytest.mark.enable_socket
Expand Down Expand Up @@ -407,7 +405,7 @@ def test_rgba():

@pytest.mark.enable_socket
def test_cmyk():
"""Decode cmyk"""
"""Decode CMYK"""
# JPEG compression
try:
from Crypto.Cipher import AES # noqa: F401
Expand Down
Loading