pytest-docker 3.2.0__tar.gz → 3.2.2__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.2.0/src/pytest_docker.egg-info → pytest_docker-3.2.2}/PKG-INFO +4 -3
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/README.md +1 -1
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/setup.cfg +1 -1
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/src/pytest_docker/__init__.py +2 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/src/pytest_docker/plugin.py +2 -4
- {pytest_docker-3.2.0 → pytest_docker-3.2.2/src/pytest_docker.egg-info}/PKG-INFO +4 -3
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/tests/test_docker_ip.py +2 -4
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/LICENSE.txt +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/pyproject.toml +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/setup.py +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/src/pytest_docker/py.typed +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/src/pytest_docker.egg-info/SOURCES.txt +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/src/pytest_docker.egg-info/dependency_links.txt +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/src/pytest_docker.egg-info/entry_points.txt +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/src/pytest_docker.egg-info/requires.txt +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/src/pytest_docker.egg-info/top_level.txt +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/tests/test_docker_services.py +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/tests/test_dockercomposeexecutor.py +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/tests/test_fixtures.py +0 -0
- {pytest_docker-3.2.0 → pytest_docker-3.2.2}/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.2.
|
|
3
|
+
Version: 3.2.2
|
|
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
|
|
|
@@ -46,10 +46,8 @@ def get_docker_ip() -> Union[str, Any]:
|
|
|
46
46
|
if not docker_host or docker_host.startswith("unix://"):
|
|
47
47
|
return "127.0.0.1"
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
raise ValueError('Invalid value for DOCKER_HOST: "%s".' % (docker_host,))
|
|
52
|
-
return match.group(1)
|
|
49
|
+
# Return just plain address without prefix and port
|
|
50
|
+
return re.sub(r"^[^:]+://(.+):\d+$", r"\1", docker_host)
|
|
53
51
|
|
|
54
52
|
|
|
55
53
|
@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.2.
|
|
3
|
+
Version: 3.2.2
|
|
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
|
|
|
@@ -23,10 +23,8 @@ def test_docker_ip_unix() -> None:
|
|
|
23
23
|
assert get_docker_ip() == "127.0.0.1"
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
@pytest.mark.parametrize("docker_host", ["http://1.2.3.4:2376"])
|
|
26
|
+
@pytest.mark.parametrize("docker_host", ["http://1.2.3.4:2376", "tcp://1.2.3.4:2376"])
|
|
27
27
|
def test_docker_ip_remote_invalid(docker_host: str) -> None:
|
|
28
28
|
environ = {"DOCKER_HOST": docker_host}
|
|
29
29
|
with mock.patch("os.environ", environ):
|
|
30
|
-
|
|
31
|
-
print(get_docker_ip())
|
|
32
|
-
assert str(exc.value) == ('Invalid value for DOCKER_HOST: "%s".' % (docker_host,))
|
|
30
|
+
assert get_docker_ip() == "1.2.3.4"
|
|
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
|