diff options
| author | Steve Piercy <web@stevepiercy.com> | 2016-05-07 00:27:34 -0700 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2016-05-07 00:27:34 -0700 |
| commit | a692f4c9bd4cb0357447558b758beecb7f966817 (patch) | |
| tree | 093c2d750e9bdb5f43717c1f4ab9d23c3862c62b /docs | |
| parent | 7734a3737923c3b1e87c29b76c30f4f39a450dbd (diff) | |
| parent | 68ba583735aedc6762131af2cf93cf0fdd470fef (diff) | |
| download | pyramid-a692f4c9bd4cb0357447558b758beecb7f966817.tar.gz pyramid-a692f4c9bd4cb0357447558b758beecb7f966817.tar.bz2 pyramid-a692f4c9bd4cb0357447558b758beecb7f966817.zip | |
Merge branch 'scaffolds-allow-pytest-run-without-args' of https://github.com/vincent-ferotin/pyramid into vincent-ferotin-scaffolds-allow-pytest-run-without-args
Diffstat (limited to 'docs')
| -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 |
