Skip to content

Commit

Permalink
Add documentation for the project and projecttestwd targets
Browse files Browse the repository at this point in the history
  • Loading branch information
bstinsonmhk committed Oct 8, 2013
1 parent 1e4c654 commit 3301320
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions doc/pytest.txt
Expand Up @@ -77,6 +77,26 @@ wanted leader mappings you would probably do them like this::
nmap <silent><Leader>c <Esc>:Pytest class<CR>
nmap <silent><Leader>m <Esc>:Pytest method<CR>

If you are working on a project, this plugin provides a way to run tests from
anywhere within the project tree like this::

" Tests are in /path/to/project/tests/
" Working on /path/to/project/module/file.py
:Pytest project

This would run all of the project tests (in /path/to/project/tests/) related
to the active project. This works with a directory called "tests" or a file
called "tests.py". It should be noted that this plugin searches upward through
the directory tree, taking the first entry it finds. For example::

" Working on /home/project/file.py
/home/tests/ " This set of tests will not be run
/home/project/tests/ " This set of tests will be run

It is easy to check which set of tests will be run (the project test working
directory)::

:Pytest projecttestwd

This plugin also provides a way to jump to the actual error. Since errors can
be living in a file other than your test (e.g. a syntax error in your source
Expand Down

0 comments on commit 3301320

Please sign in to comment.