pytest-docker 3.1.2__tar.gz → 3.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_docker-3.1.2/src/pytest_docker.egg-info → pytest_docker-3.2.1}/PKG-INFO +4 -3
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/README.md +1 -1
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/setup.cfg +1 -1
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/src/pytest_docker/__init__.py +2 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/src/pytest_docker/plugin.py +5 -4
- {pytest_docker-3.1.2 → pytest_docker-3.2.1/src/pytest_docker.egg-info}/PKG-INFO +4 -3
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/LICENSE.txt +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/pyproject.toml +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/setup.py +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/src/pytest_docker/py.typed +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/src/pytest_docker.egg-info/SOURCES.txt +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/src/pytest_docker.egg-info/dependency_links.txt +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/src/pytest_docker.egg-info/entry_points.txt +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/src/pytest_docker.egg-info/requires.txt +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/src/pytest_docker.egg-info/top_level.txt +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/tests/test_docker_ip.py +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/tests/test_docker_services.py +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/tests/test_dockercomposeexecutor.py +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/tests/test_fixtures.py +0 -0
- {pytest_docker-3.1.2 → pytest_docker-3.2.1}/tests/test_integration.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-docker
|
|
3
|
-
Version: 3.1
|
|
3
|
+
Version: 3.2.1
|
|
4
4
|
Summary: Simple pytest fixtures for Docker and Docker Compose based tests
|
|
5
5
|
Home-page: https://github.com/avast/pytest-docker
|
|
6
6
|
Author: Max K., Andre Caron
|
|
@@ -35,6 +35,7 @@ Requires-Dist: pytest-pycodestyle<3.0,>=2.0.0; extra == "tests"
|
|
|
35
35
|
Requires-Dist: pytest-mypy<1.0,>=0.10; extra == "tests"
|
|
36
36
|
Requires-Dist: types-requests<3.0,>=2.31; extra == "tests"
|
|
37
37
|
Requires-Dist: types-setuptools<70.0,>=69.0; extra == "tests"
|
|
38
|
+
Dynamic: license-file
|
|
38
39
|
|
|
39
40
|
Docker-based integration tests
|
|
40
41
|
=====
|
|
@@ -175,7 +176,7 @@ def docker_compose_project_name() -> str:
|
|
|
175
176
|
|
|
176
177
|
# Stop the stack before starting a new one
|
|
177
178
|
@pytest.fixture(scope="session")
|
|
178
|
-
def
|
|
179
|
+
def docker_setup():
|
|
179
180
|
return ["down -v", "up --build -d"]
|
|
180
181
|
```
|
|
181
182
|
|
|
@@ -21,10 +21,11 @@ def containers_scope(fixture_name: str, config: Config) -> Any: # pylint: disab
|
|
|
21
21
|
return config.getoption("--container-scope", "session")
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
def execute(command: str, success_codes: Iterable[int] = (0,)) -> Union[bytes, Any]:
|
|
24
|
+
def execute(command: str, success_codes: Iterable[int] = (0,), ignore_stderr: bool = False) -> Union[bytes, Any]:
|
|
25
25
|
"""Run a shell command."""
|
|
26
26
|
try:
|
|
27
|
-
|
|
27
|
+
stderr_pipe = subprocess.DEVNULL if ignore_stderr else subprocess.STDOUT
|
|
28
|
+
output = subprocess.check_output(command, stderr=stderr_pipe, shell=True)
|
|
28
29
|
status = 0
|
|
29
30
|
except subprocess.CalledProcessError as error:
|
|
30
31
|
output = error.output or b""
|
|
@@ -132,12 +133,12 @@ class DockerComposeExecutor:
|
|
|
132
133
|
_compose_files: Any = attr.ib(converter=str_to_list)
|
|
133
134
|
_compose_project_name: str = attr.ib()
|
|
134
135
|
|
|
135
|
-
def execute(self, subcommand: str) -> Union[bytes, Any]:
|
|
136
|
+
def execute(self, subcommand: str, **kwargs: Any) -> Union[bytes, Any]:
|
|
136
137
|
command = self._compose_command
|
|
137
138
|
for compose_file in self._compose_files:
|
|
138
139
|
command += ' -f "{}"'.format(compose_file)
|
|
139
140
|
command += ' -p "{}" {}'.format(self._compose_project_name, subcommand)
|
|
140
|
-
return execute(command)
|
|
141
|
+
return execute(command, **kwargs)
|
|
141
142
|
|
|
142
143
|
|
|
143
144
|
@pytest.fixture(scope=containers_scope)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-docker
|
|
3
|
-
Version: 3.1
|
|
3
|
+
Version: 3.2.1
|
|
4
4
|
Summary: Simple pytest fixtures for Docker and Docker Compose based tests
|
|
5
5
|
Home-page: https://github.com/avast/pytest-docker
|
|
6
6
|
Author: Max K., Andre Caron
|
|
@@ -35,6 +35,7 @@ Requires-Dist: pytest-pycodestyle<3.0,>=2.0.0; extra == "tests"
|
|
|
35
35
|
Requires-Dist: pytest-mypy<1.0,>=0.10; extra == "tests"
|
|
36
36
|
Requires-Dist: types-requests<3.0,>=2.31; extra == "tests"
|
|
37
37
|
Requires-Dist: types-setuptools<70.0,>=69.0; extra == "tests"
|
|
38
|
+
Dynamic: license-file
|
|
38
39
|
|
|
39
40
|
Docker-based integration tests
|
|
40
41
|
=====
|
|
@@ -175,7 +176,7 @@ def docker_compose_project_name() -> str:
|
|
|
175
176
|
|
|
176
177
|
# Stop the stack before starting a new one
|
|
177
178
|
@pytest.fixture(scope="session")
|
|
178
|
-
def
|
|
179
|
+
def docker_setup():
|
|
179
180
|
return ["down -v", "up --build -d"]
|
|
180
181
|
```
|
|
181
182
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|