Skip to content

Commit e2eb393

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

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
@@ -295,10 +295,10 @@ def status(self) -> str:
295295
return "not_started"
296296
return cast("str", self._container.status)
297297

298-
def exec(self, command: Union[str, list[str]]) -> ExecResult:
298+
def exec(self, command: Union[str, list[str]], *args: Any, **kwargs: Any) -> ExecResult:
299299
if not self._container:
300300
raise ContainerStartException("Container should be started before executing a command")
301-
return self._container.exec_run(command)
301+
return self._container.exec_run(command, *args, **kwargs)
302302

303303
def _configure(self) -> None:
304304
# placeholder if subclasses want to define this and use the default start method

0 commit comments

Comments
 (0)