8000 Updated test to check the new cwd parameter · HendrikMax/ffmpeg-python@17995f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 17995f5

Browse files
committed
Updated test to check the new cwd parameter
1 parent b64f40a commit 17995f5

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ffmpeg/tests/test_ffmpeg.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,12 +441,14 @@ def test__compile():
441441
@pytest.mark.parametrize('pipe_stdin', [True, False])
442442
@pytest.mark.parametrize('pipe_stdout', [True, False])
443443
@pytest.mark.parametrize('pipe_stderr', [True, False])
444-
def test__run_async(mocker, pipe_stdin, pipe_stdout, pipe_stderr):
444+
@pytest.mark.parametrize('cwd', [None, '/tmp'])
445+
def test__run_async(mocker, pipe_stdin, pipe_stdout, pipe_stderr, cwd):
445446
process__mock = mock.Mock()
446447
popen__mock = mocker.patch.object(subprocess, 'Popen', return_value=process__mock)
447448
stream = _get_simple_example()
448449
process = ffmpeg.run_async(
449-
stream, pipe_stdin=pipe_stdin, pipe_stdout=pipe_stdout, pipe_stderr=pipe_stderr
450+
stream, pipe_stdin=pipe_stdin, pipe_stdout=pipe_stdout,
451+
pipe_stderr=pipe_stderr, cwd=cwd
450452
)
451453
assert process is process__mock
452454

@@ -456,7 +458,8 @@ def test__run_async(mocker, pipe_stdin, pipe_stdout, pipe_stderr):
456458
(args,), kwargs = popen__mock.call_args
457459
assert args == ffmpeg.compile(stream)
458460
assert kwargs == dict(
459-
stdin=expected_stdin, stdout=expected_stdout, stderr=expected_stderr
461+
stdin=expected_stdin, stdout=expected_stdout, stderr=expected_stderr,
462+
cwd=cwd
460463
)
461464

462465

0 commit comments

Comments
 (0)
0