diff --git a/doc/test/features.txt b/doc/test/features.txt index 2cfa5b384..2de4dc178 100644 --- a/doc/test/features.txt +++ b/doc/test/features.txt @@ -21,7 +21,7 @@ on CPython 2.3 - CPython 2.6. 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 modules a leading ``test_`` or trailing ``_test`` filename. From each test module every function with a leading ``test_`` diff --git a/doc/test/funcargs.txt b/doc/test/funcargs.txt index 6805d8d39..2f6a904b9 100644 --- a/doc/test/funcargs.txt +++ b/doc/test/funcargs.txt @@ -289,6 +289,7 @@ Funcarg Tutorial Examples .. _`application setup tutorial example`: +.. _appsetup: 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 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 - def pytest_funcarg__accept(self, request): - arg = request.getfuncargvalue("accept") # call the next factory + def pytest_funcarg__accept(request): + # call the next factory (living in our conftest.py) + arg = request.getfuncargvalue("accept") # create a special layout in our tempdir arg.tmpdir.mkdir("special") return arg diff --git a/doc/test/talks.txt b/doc/test/talks.txt index 390065957..e6f2348e2 100644 --- a/doc/test/talks.txt +++ b/doc/test/talks.txt @@ -4,7 +4,40 @@ Talks and Tutorials .. _`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): diff --git a/doc/test/test.txt b/doc/test/test.txt index 58394e752..115815f93 100644 --- a/doc/test/test.txt +++ b/doc/test/test.txt @@ -13,6 +13,8 @@ quickstart_: for getting started immediately. features_: a walk through basic features and usage. +`talks, tutorials, examples`_: tutorial examples, slides + `available plugins`_: list of py.test plugins 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 -talks_: talk and tutorial slides .. _`available plugins`: plugin/index.html -.. _talks: talks.html +.. _`talks, tutorials, examples`: talks.html .. _quickstart: quickstart.html .. _features: features.html .. _funcargs: funcargs.html diff --git a/py/compat/LICENSE b/py/compat/LICENSE index e58eb97f9..881562cd3 100644 --- a/py/compat/LICENSE +++ b/py/compat/LICENSE @@ -1,7 +1,7 @@ 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 - copyrighted by the Python Software Foundation and licensed under the Python Software License of which you can find a copy