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

Streamline test skipping based on supported features #4434

Merged
merged 3 commits into from Feb 19, 2020
Merged

Streamline test skipping based on supported features #4434

merged 3 commits into from Feb 19, 2020

Conversation

jdufresne
Copy link
Contributor

@jdufresne jdufresne commented Feb 18, 2020

This adds a new test decorator: skip_unless_feature(). The argument is the same as passed to features.check(). If the feature is not supported, the test will be skipped.

This removes several kinds of boilerplate copied and pasted around tests so test feature checking is handled and displayed more consistently.

Refs #4193

src/PIL/features.py Outdated Show resolved Hide resolved
The gif_encoder and gif_decoder are always compiled and included in
src/_imaging.c.
The test_sanity() already checks the decorder exists and the other tests
can run without zlib/jpeg installed.
This adds a new test decorator: skip_unless_feature(). The argument is
the same as passed to features.check(). If the feature is not supported,
the test will be skipped.

This removes several kinds of boilerplate copied and pasted around tests
so test feature checking is handled and displayed more consistently.

Refs #4193
@hugovk hugovk merged commit 79859f0 into python-pillow:master Feb 19, 2020
@hugovk
Copy link
Member

hugovk commented Feb 19, 2020

Thanks!

@jdufresne jdufresne deleted the features branch December 20, 2020 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants