update various doc bits, fix typos

--HG--
branch : 1.0.x
This commit is contained in:
holger krekel 2009-08-04 22:33:24 +02:00
parent 818de59080
commit 91597f4100
5 changed files with 44 additions and 8 deletions

View File

@ -21,7 +21,7 @@ on CPython 2.3 - CPython 2.6.
automatically collects and executes tests automatically collects and executes tests
=============================================== ===============================================
py.test discovers tests automatically by inspect specified py.test discovers tests automatically by inspecting specified
directories or files. By default, it collects all python directories or files. By default, it collects all python
modules a leading ``test_`` or trailing ``_test`` filename. modules a leading ``test_`` or trailing ``_test`` filename.
From each test module every function with a leading ``test_`` From each test module every function with a leading ``test_``

View File

@ -289,6 +289,7 @@ Funcarg Tutorial Examples
.. _`application setup tutorial example`: .. _`application setup tutorial example`:
.. _appsetup:
application specific test setup application specific test setup
--------------------------------------------------------- ---------------------------------------------------------
@ -494,12 +495,13 @@ example: decorating a funcarg in a test module
For larger scale setups it's sometimes useful to decorare For larger scale setups it's sometimes useful to decorare
a funcarg just for a particular test module. We can a funcarg just for a particular test module. We can
extend the `accept example`_ by putting this in our test class: extend the `accept example`_ by putting this in our test module:
.. sourcecode:: python .. sourcecode:: python
def pytest_funcarg__accept(self, request): def pytest_funcarg__accept(request):
arg = request.getfuncargvalue("accept") # call the next factory # call the next factory (living in our conftest.py)
arg = request.getfuncargvalue("accept")
# create a special layout in our tempdir # create a special layout in our tempdir
arg.tmpdir.mkdir("special") arg.tmpdir.mkdir("special")
return arg return arg

View File

@ -4,7 +4,40 @@ Talks and Tutorials
.. _`funcargs`: funcargs.html .. _`funcargs`: funcargs.html
a list of the latest talk and tutorial material: tutorial examples and blog postings
---------------------------------------------
function arguments:
- `application setup in test functions with funcargs`_ (doc link)
- `monkey patching done right`_ (blog post, consult `monkeypatch
plugin`_ for actual 1.0 API)
test parametrization:
- `generating parametrized tests with funcargs`_ (doc link)
- `parametrizing tests, generalized`_ (blog entry)
- `putting test-hooks into local or global plugins`_ (blog entry)
distributed testing:
- `simultanously test your code on all platforms`_ (blog entry)
plugins:
- usage examples are in most of the referenced `plugins`_ docs
.. _plugins: plugin/index.html
.. _`monkeypatch plugin`: plugin/monkeypatch.html
.. _`application setup in test functions with funcargs`: funcargs.html#appsetup
.. _`simultanously test your code on all platforms`: http://tetamap.wordpress.com/2009/03/23/new-simultanously-test-your-code-on-all-platforms/
.. _`monkey patching done right`: http://tetamap.wordpress.com/2009/03/03/monkeypatching-in-unit-tests-done-right/
.. _`putting test-hooks into local or global plugins`: http://tetamap.wordpress.com/2009/05/14/putting-test-hooks-into-local-and-global-plugins/
.. _`parametrizing tests, generalized`: http://tetamap.wordpress.com/2009/05/13/parametrizing-python-tests-generalized/
.. _`generating parametrized tests with funcargs`: funcargs.html#test-generators
conference talks and tutorials
----------------------------------------
- `ep2009-rapidtesting.pdf`_ tutorial slides (July 2009): - `ep2009-rapidtesting.pdf`_ tutorial slides (July 2009):

View File

@ -13,6 +13,8 @@ quickstart_: for getting started immediately.
features_: a walk through basic features and usage. features_: a walk through basic features and usage.
`talks, tutorials, examples`_: tutorial examples, slides
`available plugins`_: list of py.test plugins `available plugins`_: list of py.test plugins
funcargs_: powerful parametrized test function setup funcargs_: powerful parametrized test function setup
@ -23,10 +25,9 @@ extend_: intro to extend and customize py.test runs
config_: ``conftest.py`` files and the config object config_: ``conftest.py`` files and the config object
talks_: talk and tutorial slides
.. _`available plugins`: plugin/index.html .. _`available plugins`: plugin/index.html
.. _talks: talks.html .. _`talks, tutorials, examples`: talks.html
.. _quickstart: quickstart.html .. _quickstart: quickstart.html
.. _features: features.html .. _features: features.html
.. _funcargs: funcargs.html .. _funcargs: funcargs.html

View File

@ -1,7 +1,7 @@
License for modules in py/compat directory License for modules in py/compat directory
============================================================== ==============================================================
The "*.py" files in py/compat/ and subdirectories are are all The "*.py" files in py/compat/ and subdirectories are all
- except when otherwise stated at the beginning of the file - - except when otherwise stated at the beginning of the file -
copyrighted by the Python Software Foundation and licensed copyrighted by the Python Software Foundation and licensed
under the Python Software License of which you can find a copy under the Python Software License of which you can find a copy