mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
OP-2646 - added barebone unit test for ffmpeg_full_args_filters
This commit is contained in:
parent
d509234066
commit
b292438e2b
1 changed files with 30 additions and 0 deletions
30
tests/unit/openpype/plugins/publish/test_extract_review.py
Normal file
30
tests/unit/openpype/plugins/publish/test_extract_review.py
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
from openpype.plugins.publish.extract_review import ExtractReview
|
||||||
|
|
||||||
|
|
||||||
|
def test_fix_ffmpeg_full_args_filters():
|
||||||
|
"""Tests because of wrong resolution of audio filters."""
|
||||||
|
plugin = ExtractReview()
|
||||||
|
output_arg = "c:/test-afbdc"
|
||||||
|
ret = plugin.ffmpeg_full_args([], [], [], [output_arg])
|
||||||
|
assert len(ret) == 2, "Parsed wrong"
|
||||||
|
assert ret[-1] == output_arg
|
||||||
|
|
||||||
|
ret = plugin.ffmpeg_full_args([], [], ["adeclick"], [output_arg])
|
||||||
|
assert len(ret) == 4, "Parsed wrong"
|
||||||
|
assert ret[-1] == output_arg
|
||||||
|
assert ret[-2] == '"adeclick"'
|
||||||
|
assert ret[-3] == "-filter:a"
|
||||||
|
|
||||||
|
ret = plugin.ffmpeg_full_args([], [], [], [output_arg, "-af adeclick"])
|
||||||
|
assert len(ret) == 4, "Parsed wrong"
|
||||||
|
assert ret[-1] == output_arg
|
||||||
|
assert ret[-2] == '"adeclick"'
|
||||||
|
assert ret[-3] == "-filter:a"
|
||||||
|
|
||||||
|
ret = plugin.ffmpeg_full_args([], [], ["adeclick"],
|
||||||
|
[output_arg, "-af adeclick"])
|
||||||
|
assert len(ret) == 4, "Parsed wrong"
|
||||||
|
assert ret[-1] == output_arg
|
||||||
|
assert ret[-2] == '"adeclick,addeclick"' # TODO fix this duplication
|
||||||
|
assert ret[-3] == "-filter:a"
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue