Executes a command using the configured mode (interactive or stateless).
(self, command: str, timeout: int = 300)
| 126 | raise |
| 127 | |
| 128 | def execute(self, command: str, timeout: int = 300) -> tuple[int, str]: |
| 129 | """ |
| 130 | Executes a command using the configured mode (interactive or stateless). |
| 131 | """ |
| 132 | if not self.container: |
| 133 | raise RuntimeError("Container is not running. Call start() first.") |
| 134 | |
| 135 | # if self.interactive: |
| 136 | return self._execute_interactive(command, timeout) |
| 137 | # else: |
| 138 | # return self._execute_stateless(command) |
| 139 | |
| 140 | def stop(self): |
| 141 | """Stops the pexpect shell and cleans up the container if managed by this instance.""" |
nothing calls this directly
no test coverage detected