8000 Revert "Implemented cwd parameter" · stu-github/ffmpeg-python@c764166 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c764166

Browse files
authored
Revert "Implemented cwd parameter"
1 parent 4974364 commit c764166

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

ffmpeg/_run.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ def run_async(
199199
pipe_stderr=False,
200200
quiet=False,
201201
overwrite_output=False,
202-
cwd=None
203202
):
204203
"""Asynchronously invoke ffmpeg for the supplied node graph.
205204
@@ -286,8 +285,7 @@ def run_async(
286285
stderr_stream = subprocess.STDOUT
287286
stdout_stream = subprocess.DEVNULL
288287
return subprocess.Popen(
289-
args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream,
290-
cwd=cwd
288+
args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream
291289
)
292290

293291

@@ -300,7 +298,6 @@ def run(
300298
input=None,
301299
quiet=False,
302300
overwrite_output=False,
303-
cwd=None
304301
):
305302
"""Invoke ffmpeg for the supplied node graph.
306303
@@ -324,7 +321,6 @@ def run(
324321
pipe_stderr=capture_stderr,
325322
quiet=quiet,
326323
overwrite_output=overwrite_output,
327-
cwd=cwd
328324
)
329325
out, err = process.communicate(input)
330326
retcode = process.poll()

ffmpeg/tests/test_ffmpeg.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,14 +441,12 @@ 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-
@pytest.mark.parametrize('cwd', [None, '/tmp'])
445-
def test__run_async(mocker, pipe_stdin, pipe_stdout, pipe_stderr, cwd):
444+
def test__run_async(mocker, pipe_stdin, pipe_stdout, pipe_stderr):
446445
process__mock = mock.Mock()
447446
popen__mock = mocker.patch.object(subprocess, 'Popen', return_value=process__mock)
448447
stream = _get_simple_example()
449448
process = ffmpeg.run_async(
450-
stream, pipe_stdin=pipe_stdin, pipe_stdout=pipe_stdout,
451-
pipe_stderr=pipe_stderr, cwd=cwd
449+
stream, pipe_stdin=pipe_stdin, pipe_stdout=pipe_stdout, pipe_stderr=pipe_stderr
452450
)
453451
assert process is process__mock
454452

@@ -458,8 +456,7 @@ def test__run_async(mocker, pipe_stdin, pipe_stdout, pipe_stderr, cwd):
458456
(args,), kwargs = popen__mock.call_args
459457
assert args == ffmpeg.compile(stream)
460458
assert kwargs == dict(
461-
stdin=expected_stdin, stdout=expected_stdout, stderr=expected_stderr,
462-
cwd=cwd
459+
stdin=expected_stdin, stdout=expected_stdout, stderr=expected_stderr
463460
)
464461

465462

0 commit comments

Comments
 (0)
0