From 71cb42d26389fdab7227d87c5296fdd39e3fcde1 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Thu, 8 Jul 2010 20:13:39 +0200 Subject: [PATCH] updating some feature descriptions --HG-- branch : trunk --- doc/test/features.txt | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/doc/test/features.txt b/doc/test/features.txt index 16a646baa..02c67598a 100644 --- a/doc/test/features.txt +++ b/doc/test/features.txt @@ -82,7 +82,7 @@ filename are inspected for finding tests: * classes with a leading ``Test`` name and ``test`` prefixed methods. * ``unittest.TestCase`` subclasses -parametrizing test functions and advanced functional testing +parametrizing test functions and functional testing -------------------------------------------------------------- py.test offers the unique `funcargs mechanism`_ for setting up @@ -177,32 +177,32 @@ test functions. You can modify traceback printing styles through the command line. Using the `--pdb`` option you can automatically activate a PDB `Python debugger`_ when a test fails. -advanced skipping of tests +skip or expect-to-fail a test ====================================== -py.test has `advanced support for skipping tests`_ or expecting -failures on tests on certain platforms. Apart from the -minimal py.test style also unittest- and nose-style tests -can make use of this feature. +py.test has a dedicated `skipping plugin`_ that allows to define -.. _`advanced support for skipping tests`: plugin/skipping.html +* define "skip" outcomes indicating a platform or a + dependency mismatch. + +* "xfail" outcomes indicating an "expected failure" either with + with or without running a test. + +* skip and xfail outcomes can be applied at module, class or method + level or even only for certain argument sets of a parametrized function. + +.. _`skipping plugin`: plugin/skipping.html .. _`funcargs mechanism`: funcargs.html .. _`unittest.py`: http://docs.python.org/library/unittest.html .. _`doctest.py`: http://docs.python.org/library/doctest.html .. _`xUnit style setup`: xunit_setup.html .. _`pytest_nose`: plugin/nose.html -advanced test selection and running modes +select tests by keyword / test name search ========================================================= .. _`selection by keyword`: -``py.test --looponfailing`` (implemented through the external -`pytest-xdist`_ plugin) allows to run a test suite, -memorize all failures and then loop over the failing set -of tests until they all pass. It will re-start running -the tests when it detects file changes in your project. - You can selectively run tests by specifiying a keyword on the command line. Examples:: @@ -236,6 +236,15 @@ plugin for more information. .. _`pytest_keyword`: plugin/mark.html +Looping on the failing test set +======================================= + +``py.test --looponfailing`` (implemented through the external +`pytest-xdist`_ plugin) allows to run a test suite, +memorize all failures and then loop over the failing set +of tests until they all pass. It will re-start running +the tests when it detects file changes in your project. + .. _`reStructured Text`: http://docutils.sourceforge.net .. _`Python debugger`: http://docs.python.org/lib/module-pdb.html