@@ -5,11 +5,13 @@ Overview
5
5
~~~~~~~~
6
6
7
7
.. _cmd2_external_test_plugin :
8
- https://github.com/python-cmd2/cmd2-ext-test/
8
+ https://github.com/python-cmd2/cmd2/tree/cmdset_settables/plugins/ext_test
9
9
10
- The cmd2_external_test_plugin _ supports testing of a cmd2 application by exposing access cmd2 commands with the same
11
- context as from within a cmd2 pyscript. This allows for verification of an application's support for pyscripts and
12
- enables the cmd2 application to be tested as part of a larger system integration test.
10
+ The `External Test Plugin <cmd2_external_test_plugin _>`_ supports testing of a cmd2 application by exposing access cmd2
11
+ commands with the same context as from within a cmd2 :ref: `Python Scripts <scripting-python-scripts >`. This interface
12
+ captures ``stdout ``, ``stderr ``, as well as any application-specific data returned by the command. This also allows
13
+ for verification of an application's support for :ref: `Python Scripts <scripting-python-scripts >` and enables the cmd2
14
+ application to be tested as part of a larger system integration test.
13
15
14
16
15
17
Example cmd2 Application
@@ -59,11 +61,11 @@ In your test, define a fixture for your cmd2 application
59
61
Writing Tests
60
62
~~~~~~~~~~~~~
61
63
62
- Now write your tests that validate your application using the ` app_cmd ` function to access
63
- the cmd2 application's commands. This allows invocation of the application's commands in the
64
+ Now write your tests that validate your application using the :meth: ` ~cmd2_ext_test.ExternalTestMixin. app_cmd() `
65
+ function to access the cmd2 application's commands. This allows invocation of the application's commands in the
64
66
same format as a user would type. The results from calling a command matches what is returned
65
- from running an python script with cmd2's pyscript command, which provides stdout, stderr, and
66
- the command's result data.
67
+ from running an python script with cmd2's :ref: ` feature-builtin-commands-run- pyscript` command, which provides
68
+ `` stdout ``, `` stderr ``, and the command's result data.
67
69
68
70
.. code-block :: python
69
71
0 commit comments