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

Fix running tests with jpeg, tiff and zlib support being unavailable #199

Merged
merged 6 commits into from
Apr 21, 2013
Merged

Fix running tests with jpeg, tiff and zlib support being unavailable #199

merged 6 commits into from
Apr 21, 2013

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Apr 21, 2013

Some of the current tests are skipped properly when relevant features are not available. This patch adds similar measures to all the remaining tests, so that the test suite succeeds even with all features being disabled.

In most cases, this was done through conditional test skipping. test_imagefile is done only on the formats that are enabled. test_image_draft gets a fallback to a PCX file (and no RGBA) if PNG is not available.

The .tar test requires both jpeg & zlib support. If one of the two is
unavailable, run the test for the second one. If both are unavailable,
skip the test.
If PNG (zlib) support is disabled, use .pcx for test_image_split which
is unconditional. Since it does not support RGBA, skip the RGBA test.
Otherwise, just use PNG and do the full test.
@mgorny
Copy link
Contributor Author

mgorny commented Apr 21, 2013

As a side note, this only fixes the Tests/run.py tests. I have no idea how to handle doctests in selftest.py.

@mgorny
Copy link
Contributor Author

mgorny commented Apr 21, 2013

Would you be able to pick the correct commits from this PR and merge them so I could rebase my work on top of it? I find Mercurial very hard to use compared to git, so I would prefer avoiding trying to do something like this myself :).

@wiredfool
Copy link
Member

yeah, I'll split those out.

wiredfool added a commit that referenced this pull request Apr 21, 2013
Skip tests for features that aren't compiled in, includes #199
@wiredfool wiredfool merged commit 995fe2b into python-pillow:master Apr 21, 2013
@mgorny
Copy link
Contributor Author

mgorny commented Apr 21, 2013

Wait, why did I think Mercurial's involved? :D I guess I've mistaken this with the other PR I sent today. I'll try to take a second look at the tests tomorrow.

@wiredfool
Copy link
Member

I added the libtiff test changes in #201, so I think we're set there.

radarhere added a commit to radarhere/Pillow that referenced this pull request Sep 24, 2023
Fix expected features list on Travis
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

Successfully merging this pull request may close these issues.

None yet

2 participants