MCPcopy
hub / github.com/pallets/flask / test_cli_runner

Method test_cli_runner

src/flask/app.py:727–742  ·  view source on GitHub ↗

Create a CLI runner for testing CLI commands. See :ref:`testing-cli`. Returns an instance of :attr:`test_cli_runner_class`, by default :class:`~flask.testing.FlaskCliRunner`. The Flask app object is passed as the first argument. .. versionadded:: 1.0

(self, **kwargs: t.Any)

Source from the content-addressed store, hash-verified

725 )
726
727 def test_cli_runner(self, **kwargs: t.Any) -> FlaskCliRunner:
728 """Create a CLI runner for testing CLI commands.
729 See :ref:`testing-cli`.
730
731 Returns an instance of :attr:`test_cli_runner_class`, by default
732 :class:`~flask.testing.FlaskCliRunner`. The Flask app object is
733 passed as the first argument.
734
735 .. versionadded:: 1.0
736 """
737 cls = self.test_cli_runner_class
738
739 if cls is None:
740 from .testing import FlaskCliRunner as cls
741
742 return cls(self, **kwargs) # type: ignore
743
744 def handle_http_exception(
745 self, e: HTTPException

Callers 6

test_cli_blueprintsFunction · 0.80
test_cli_emptyFunction · 0.80
test_cli_runner_classFunction · 0.80
test_cli_invokeFunction · 0.80
test_cli_custom_objFunction · 0.80
runnerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected