From 33013204f23e4692a0260cd6fadb270e86ebdf09 Mon Sep 17 00:00:00 2001 From: Brian Stinson Date: Mon, 7 Oct 2013 23:09:14 -0500 Subject: [PATCH] Add documentation for the project and projecttestwd targets --- doc/pytest.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/pytest.txt b/doc/pytest.txt index 9fcebff..4be3cf7 100755 --- a/doc/pytest.txt +++ b/doc/pytest.txt @@ -77,6 +77,26 @@ wanted leader mappings you would probably do them like this:: nmap c :Pytest class nmap m :Pytest method +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