Skip to content

Commit ed7dc23

Browse files
resolve doc tests?
1 parent ce74358 commit ed7dc23

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

core/testcontainers/compose/compose.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ class DockerCompose:
148148
149149
>>> from testcontainers.compose import DockerCompose
150150
151-
>>> compose = DockerCompose("compose/tests", compose_file_name="docker-compose-4.yml",
151+
>>> compose = DockerCompose("core/tests/compose_fixtures/basic", compose_file_name="hello.yaml",
152152
... pull=True)
153153
>>> with compose:
154154
... stdout, stderr = compose.get_logs()
155-
>>> b"Hello from Docker!" in stdout
155+
>>> "Hello from Docker!" in stdout
156156
True
157157
158158
.. code-block:: yaml
@@ -356,7 +356,7 @@ def exec_in_container(
356356
357357
Args:
358358
service_name: Name of the docker compose service to run the command in.
359-
command: Command to execute.
359+
command: Command to execute.
360360
361361
:param service_name: specify the service name
362362
:param command: the command to run in the container

core/testcontainers/core/container.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ class Reaper:
196196
"""
197197
:meta private:
198198
"""
199+
199200
_instance: "Optional[Reaper]" = None
200201
_container: Optional[DockerContainer] = None
201202
_socket: Optional[socket] = None
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
hello:
3+
image: alpine:latest
4+
init: true
5+
command:
6+
- sh
7+
- -c
8+
- 'while true; do echo "Hello from Docker!"; sleep 1; done'

0 commit comments

Comments
 (0)