From 8db9b748181dc3168613c2af18f728c8eb054fdb Mon Sep 17 00:00:00 2001 From: Brian Hou Date: Sun, 21 Aug 2022 14:35:48 -0700 Subject: [PATCH] Add test for PathLike input and output. --- ffmpeg/tests/test_ffmpeg.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ffmpeg/tests/test_ffmpeg.py b/ffmpeg/tests/test_ffmpeg.py index 8dbc271a..4384ab9a 100644 --- a/ffmpeg/tests/test_ffmpeg.py +++ b/ffmpeg/tests/test_ffmpeg.py @@ -79,6 +79,14 @@ def test_fluent_complex_filter(): ).output('dummy2.mp4') +@pytest.mark.skipif(sys.version_info < (3, 6), reason='requires python3.6 or higher') +def test_pathlike_input_output(): + from pathlib import Path + base = ffmpeg.input(Path("dummy.mp4")) + base.output(filename=Path("dummy2.mp4")) + base.output(Path("dummy3.mp4")) + + def test_node_repr(): in_file = ffmpeg.input('dummy.mp4') trim1 = ffmpeg.trim(in_file, start_frame=10, end_frame=20)