Bugfix: -o m4a would fail [Fixes #720]

In FFmpeg, a given encoding may not always point to the same format
string.
This commit is contained in:
Ritiek Malhotra
2020-05-18 14:01:01 +05:30
parent 675d1805ed
commit cd5f224e37
5 changed files with 31 additions and 5 deletions

View File

@@ -86,3 +86,12 @@ class TestMethods:
def test_encoder_not_found_error(self):
with pytest.raises(EncoderNotFoundError):
self.EncoderKid("/a/nonexistent/path", "0", [])
@pytest.mark.parametrize("encoding, target_format", [
("m4a", "mp4"),
("mp3", "mp3"),
("opus", "opus"),
("flac", "flac"),
])
def test_target_format_from_encoding(self, encoderkid, encoding, target_format):
assert encoderkid.target_format_from_encoding(encoding) == target_format