Skip to content

Commit a9de332

Browse files
committed
feat(core): Pass-through extra arguments to the underlying container
1 parent e25713a commit a9de332

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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 get_container_info(self) -> Optional[ContainerInspectInfo]:
334334
"""Get container information via docker inspect (lazy loaded).

0 commit comments

Comments
 (0)