Run the application command :param command: The application command as it would be written on the cmd2 application prompt :param echo: Flag whether the command's output should be echoed to stdout/stderr :return: A CommandResult object that captures stdout, stderr, a
(self, command: str, echo: bool | None = None)
| 137 | self._pybridge = cmd2.py_bridge.PyBridge(self) |
| 138 | |
| 139 | def app_cmd(self, command: str, echo: bool | None = None) -> cmd2.CommandResult: |
| 140 | """ |
| 141 | Run the application command |
| 142 | |
| 143 | :param command: The application command as it would be written on the cmd2 application prompt |
| 144 | :param echo: Flag whether the command's output should be echoed to stdout/stderr |
| 145 | :return: A CommandResult object that captures stdout, stderr, and the command's result object |
| 146 | """ |
| 147 | try: |
| 148 | self._in_py = True |
| 149 | return self._pybridge(command, echo=echo) |
| 150 | |
| 151 | finally: |
| 152 | self._in_py = False |
| 153 | |
| 154 | def fixture_setup(self): |
| 155 | """Replicates the behavior of `cmdloop()` to prepare the application state for testing. |
no outgoing calls
no test coverage detected