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

Skip tests that use unavailable codecs #362

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

antlarr
Copy link
Contributor

@antlarr antlarr commented Feb 19, 2019

In openSUSE, the official ffmpeg package doesn't support aac audio and some other codecs due
to legal reasons. There are ffmpeg packages available that support all codecs, but when building the official pydub packages, the official ffmpeg package is used, and so, when running tests, some of these fail because the files format_test.m4a, creative_common.mp4 and wrong_extension.aac can't be read since they use aac audio.

This commit adds two functions get_supported_decoders and get_supported_encoders that return a set with the decoders/encoders that are supported. Then it also adds some decorators to some tests to skip the tests that use unsupported codecs.

Note that functools.lru_cache was added in python 3.3, so it can't be used and that's the reason I added a small implementation of a cache decorator so we don't have to execute ffmpeg for every call to get the supported codecs.

In openSUSE, ffmpeg doesn't support aac audio and some other codecs due
to legal reasons. When building the pydub packages and running tests,
some of these fail because the files format_test.m4a, creative_common.mp4
wrong_extension.aac can't be read since they use aac audio.

This commit adds two functions get_supported_decoders and
get_supported_encoders that return a set with the decoders/encoders that
are supported. Then it also adds some decorators to the tests to skip
the tests that use unsupported codecs.

Note that functools.lru_cache was added in python 3.3, so it can't be
used and that's the reason I added a small implementation of a cache
decorator so we don't have to execute ffmpeg for every call to get
the supported codecs.
@jiaaro jiaaro merged commit 9dd0973 into jiaaro:master Feb 20, 2019
@GreyAlien502 GreyAlien502 mentioned this pull request May 12, 2020
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