Skip to content

Commit

Permalink
Move code to a package (fixes #82)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ch00k committed Dec 19, 2024
1 parent 6972473 commit 4ad7614
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ffmpy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .ffmpy import FFExecutableNotFoundError, FFmpeg, FFprobe, FFRuntimeError

__all__ = ["FFmpeg", "FFprobe", "FFExecutableNotFoundError", "FFRuntimeError"]
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ classifiers = [
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
]
packages = [{ include = "ffmpy.py" }, { include = "py.typed" }]
packages = [{ include = "ffmpy" }]

[tool.poetry.dependencies]
python = "^3.8"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cmd_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def test_terminate_process() -> None:
assert ff.process.returncode == -15


@mock.patch("ffmpy.subprocess.Popen")
@mock.patch("ffmpy.ffmpy.subprocess.Popen")
def test_custom_env(popen_mock: mock.MagicMock) -> None:
ff = FFmpeg()
popen_mock.return_value.communicate.return_value = ("output", "error")
Expand All @@ -213,7 +213,7 @@ def test_custom_env(popen_mock: mock.MagicMock) -> None:
)


@mock.patch("ffmpy.subprocess.Popen")
@mock.patch("ffmpy.ffmpy.subprocess.Popen")
def test_arbitraty_popen_kwargs(popen_mock: mock.MagicMock) -> None:
ff = FFmpeg()
popen_mock.return_value.communicate.return_value = ("output", "error")
Expand Down

0 comments on commit 4ad7614

Please sign in to comment.