@@ -154,11 +154,11 @@ class DockerCompose:
154
154
155
155
>>> from testcontainers.compose import DockerCompose
156
156
157
- >>> compose = DockerCompose("compose /tests", compose_file_name="docker-compose-4.yml ",
157
+ >>> compose = DockerCompose("core /tests/compose_fixtures/basic ", compose_file_name="hello.yaml ",
158
158
... pull=True)
159
159
>>> with compose:
160
160
... stdout, stderr = compose.get_logs()
161
- >>> b "Hello from Docker!" in stdout
161
+ >>> "Hello from Docker!" in stdout
162
162
True
163
163
164
164
.. code-block:: yaml
@@ -197,7 +197,7 @@ def docker_compose_command(self) -> list[str]:
197
197
Returns command parts used for the docker compose commands
198
198
199
199
Returns:
200
- cmd : Docker compose command parts.
200
+ list[str] : Docker compose command parts.
201
201
"""
202
202
return self .compose_command_property
203
203
@@ -263,8 +263,8 @@ def get_logs(self, *services: str) -> tuple[str, str]:
263
263
:param services: which services to get the logs for (or omit, for all)
264
264
265
265
Returns:
266
- stdout: Standard output stream.
267
- stderr: Standard error stream.
266
+ str: stdout: Standard output stream.
267
+ str: stderr: Standard error stream.
268
268
"""
269
269
logs_cmd = [* self .compose_command_property , "logs" , * services ]
270
270
@@ -364,15 +364,15 @@ def exec_in_container(
364
364
365
365
Args:
366
366
service_name: Name of the docker compose service to run the command in.
367
- command: Command to execute.
367
+ command: Command to execute.
368
368
369
369
:param service_name: specify the service name
370
370
:param command: the command to run in the container
371
371
372
372
Returns:
373
- stdout: Standard output stream.
374
- stderr: Standard error stream.
375
- exit_code: The command's exit code.
373
+ str: stdout: Standard output stream.
374
+ str: stderr: Standard error stream.
375
+ int: exit_code: The command's exit code.
376
376
"""
377
377
if not service_name :
378
378
service_name = self .get_container ().Service
0 commit comments