From 37ba0ad81e439dbc3d6cd84d379d719c0974221b Mon Sep 17 00:00:00 2001 From: lucemia Date: Wed, 15 Jan 2025 07:49:39 +0000 Subject: [PATCH] fix #423, add a test case for anullsrc as input --- .../test_input/test_input_with_filter.json | 10 ++++++++++ src/ffmpeg/dag/io/tests/test_input.py | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 src/ffmpeg/dag/io/tests/__snapshots__/test_input/test_input_with_filter.json diff --git a/src/ffmpeg/dag/io/tests/__snapshots__/test_input/test_input_with_filter.json b/src/ffmpeg/dag/io/tests/__snapshots__/test_input/test_input_with_filter.json new file mode 100644 index 00000000..f2345b2f --- /dev/null +++ b/src/ffmpeg/dag/io/tests/__snapshots__/test_input/test_input_with_filter.json @@ -0,0 +1,10 @@ +[ + "ffmpeg", + "-f", + "lavfi", + "-t", + "10", + "-i", + "anullsrc", + "output.mp4" +] diff --git a/src/ffmpeg/dag/io/tests/test_input.py b/src/ffmpeg/dag/io/tests/test_input.py index cf9700de..684c98c4 100644 --- a/src/ffmpeg/dag/io/tests/test_input.py +++ b/src/ffmpeg/dag/io/tests/test_input.py @@ -11,3 +11,9 @@ def test_input(snapshot: SnapshotAssertion) -> None: .output(filename="output.mp4") .compile() ) + + +def test_input_with_filter(snapshot: SnapshotAssertion) -> None: + assert input("anullsrc", f="lavfi", t=10).output(filename="output.mp4").compile() == snapshot( + extension_class=JSONSnapshotExtension + )