Skip to content

Commit 8a7b33d

Browse files
committed
feat(core): Pass-through extra arguments to the underlying container
1 parent 6deaf3b commit 8a7b33d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/testcontainers/core/container.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,10 @@ def status(self) -> str:
325325
return "not_started"
326326
return cast("str", self._container.status)
327327

328-
def exec(self, command: Union[str, list[str]]) -> ExecResult:
328+
def exec(self, command: Union[str, list[str]], *args: Any, **kwargs: Any) -> ExecResult:
329329
if not self._container:
330330
raise ContainerStartException("Container should be started before executing a command")
331-
return self._container.exec_run(command)
331+
return self._container.exec_run(command, *args, **kwargs)
332332

333333
def wait(self) -> int:
334334
"""Wait for the container to stop and return its exit code."""

0 commit comments

Comments
 (0)