Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pytest-docker
version = 3.2.3
version = 3.2.4
description = Simple pytest fixtures for Docker and Docker Compose based tests
long_description = file: README.md
long_description_content_type = text/markdown
Expand Down Expand Up @@ -35,7 +35,7 @@ package_dir=
packages=pytest_docker

install_requires =
pytest >=4.0, <9.0
pytest >=4.0, <10.0
attrs >=19.2.0

[options.extras_require]
Expand Down Expand Up @@ -85,3 +85,4 @@ strict = true
mypy_path = "src/pytest_docker,tests"
namespace_packages = true
warn_unused_ignores = true
warn_return_any = false
3 changes: 2 additions & 1 deletion src/pytest_docker/plugin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import contextlib
import os
from pathlib import Path
import re
import subprocess
import time
Expand Down Expand Up @@ -119,7 +120,7 @@ def wait_until_responsive(
raise Exception("Timeout reached while waiting on service!")


def str_to_list(arg: Union[str, List[Any], Tuple[Any]]) -> Union[List[Any], Tuple[Any]]:
def str_to_list(arg: Union[str, Path, List[Any], Tuple[Any]]) -> Union[List[Any], Tuple[Any]]:
if isinstance(arg, (list, tuple)):
return arg
return [arg]
Expand Down
8 changes: 4 additions & 4 deletions tests/test_dockercomposeexecutor.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import subprocess
from unittest import mock

import py
from pathlib import Path
from pytest_docker.plugin import DockerComposeExecutor


Expand Down Expand Up @@ -31,9 +31,9 @@ def test_execute_docker_compose_v2() -> None:
]


def test_pypath_compose_files() -> None:
compose_file: py.path.local = py.path.local("/tmp/docker-compose.yml")
docker_compose = DockerComposeExecutor("docker compose", compose_file, "pytest123") # type: ignore
def test_path_compose_file() -> None:
compose_file: Path = Path("/tmp/docker-compose.yml")
docker_compose = DockerComposeExecutor("docker compose", compose_file, "pytest123")
with mock.patch("subprocess.check_output") as check_output:
docker_compose.execute("up")
assert check_output.call_args_list == [
Expand Down