diff options
| author | Vincent Férotin <vincent.ferotin@gmail.com> | 2016-05-06 19:45:32 +0200 |
|---|---|---|
| committer | Vincent Férotin <vincent.ferotin@gmail.com> | 2016-05-06 19:45:32 +0200 |
| commit | 68ba583735aedc6762131af2cf93cf0fdd470fef (patch) | |
| tree | dc988f57171c6264773dba2f6ccd35df141a0c0c | |
| parent | c1732b845348763cd514721126fc05e1531e44f5 (diff) | |
| download | pyramid-68ba583735aedc6762131af2cf93cf0fdd470fef.tar.gz pyramid-68ba583735aedc6762131af2cf93cf0fdd470fef.tar.bz2 pyramid-68ba583735aedc6762131af2cf93cf0fdd470fef.zip | |
doc: Update documentation for using ``py.test [--cov]`` for newly created project with scaffolds.
| -rw-r--r-- | docs/narr/project.rst | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 56247ee33..8849e9ee7 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -209,25 +209,29 @@ On UNIX: .. code-block:: bash - $ $VENV/bin/py.test myproject/tests.py -q + $ $VENV/bin/py.test -q On Windows: .. code-block:: doscon - > %VENV%\Scripts\py.test myproject\tests.py -q + > %VENV%\Scripts\py.test -q Here's sample output from a test run on UNIX: .. code-block:: bash - $ $VENV/bin/py.test myproject/tests.py -q + $ $VENV/bin/py.test -q .. 2 passed in 0.47 seconds The tests themselves are found in the ``tests.py`` module in your ``pcreate`` generated project. Within a project generated by the ``starter`` scaffold, -only two sample tests exist. +only two sample tests exist. Previous command is identical to: + +.. code-block:: bash + + $ $VENV/bin/py.test myproject/tests.py -q .. note:: @@ -235,6 +239,14 @@ only two sample tests exist. to a stream of dots. If you don't pass ``-q``, you'll see verbose test result output (which normally isn't very useful). +Alternatively, if you'd like to see test coverage, pass the ``--cov`` option +to ``py.test``: + +.. code-block:: bash + + $ $VENV/bin/py.test -q --cov + + .. index:: single: running an application single: pserve |
