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

Added type hints to additional tests #7846

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

radarhere
Copy link
Member

No description provided.

@hugovk
Copy link
Member

hugovk commented Mar 1, 2024

The CI is failing for Ubuntu with all versions (except PyPy). For example:

ERROR Tests/test_image_fromqimage.py::test_sanity_1 - Failed: fixture function has more than one 'yield':

    @pytest.fixture
    def test_images() -> Generator[Image.Image, None, None]:
        ims = [
            hopper(),
            Image.open("Tests/images/transparent.png"),
            Image.open("Tests/images/7x13.png"),
        ]
        try:
            yield from ims
        finally:
            for im in ims:
                im.close()
/home/runner/work/Pillow/Pillow/Tests/test_image_fromqimage.py:21
FAILED Tests/test_image_fromqimage.py::test_sanity_1 - TypeError: 'PpmImageFile' object is not iterable
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 2 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!

@radarhere
Copy link
Member Author

Ok, I've updated the commit so that it passes now.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@radarhere radarhere merged commit b7f3907 into python-pillow:main Mar 3, 2024
57 checks passed
@radarhere radarhere deleted the type_hints branch March 3, 2024 10:33
@@ -152,12 +152,13 @@ def test_nonstack_dos() -> None:
assert i <= 1, "Non-stack DOS file test failed"


# for issue #4093
# for issue #4093s
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks. I've created #7855

@radarhere radarhere mentioned this pull request Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants