From 311f84ebd5024dbd56faa32756deca70fe5a24b7 2010-01-16 23:25:18 From: Fernando Perez Date: 2010-01-16 23:25:18 Subject: [PATCH] Doc updates to testing to reflect recent changes. Updated revnumber to push an updated testing release out for this branch. --- diff --git a/IPython/core/release.py b/IPython/core/release.py index d97814a..2bc9de5 100644 --- a/IPython/core/release.py +++ b/IPython/core/release.py @@ -23,7 +23,7 @@ name = 'ipython' development = True # change this to False to do a release version_base = '0.11' branch = 'ipython' -revision = '1321' +revision = '1340' if development: if branch == 'ipython': diff --git a/docs/source/development/testing.txt b/docs/source/development/testing.txt index 440ff7c..c5bdaaf 100644 --- a/docs/source/development/testing.txt +++ b/docs/source/development/testing.txt @@ -56,6 +56,9 @@ and similarly, you can execute the built-in test suite with: python iptest.py +This script manages intelligently both nose and trial, choosing the correct +test system for each of IPython's components. + Once you have either installed it or at least configured your system to be able to import IPython, you can run the tests with: @@ -65,59 +68,56 @@ able to import IPython, you can run the tests with: This should work as long as IPython can be imported, even if you haven't fully installed the user-facing scripts yet (common in a development environment). +Once you have installed IPython, you will have available system-wide a script +called :file:`iptest` that does the exact same as the :file:`iptest.py` script +in the source directory, so you can then test simply with: + +.. code-block:: bash + + iptest [args] Regardless of how you run things, you should eventually see something like: .. code-block:: bash - - ************************************************************************ - Ran 10 test groups in 35.228s - OK + ********************************************************************** + Ran 11 test groups in 64.117s -If not, there will be a message indicating which test group failed and how to -rerun that group individually. + OK -But IPython ships with an entry point script called :file:`iptest` that offers -fine-grain control over the test process and is particularly useful for -developers; this script also manages intelligently both nose and trial, -choosing the correct test system for each of IPython's components. Running -:file:`iptest` without arguments gives output identical to that above, but with -it, you can also run specific tests with fine control. The :file:`iptest` -script is installed with IPython, but if you are running from a source tree, -you can find it in the :file:`IPython/scripts` directory and you can run -directly from there. -For example, this tests the :mod:`IPython.utils` subpackage, the :option:`-v` -option shows progress indicators: +If not, there will be a message indicating which test group failed and how to +rerun that group individually. For example, this tests the +:mod:`IPython.utils` subpackage, the :option:`-v` option shows progress +indicators: .. code-block:: bash - maqroll[ipython]> cd IPython/scripts/ - maqroll[scripts]> ./iptest -v IPython.utils - ..........................SS..SSS............................S.S......... - ................................................... - ---------------------------------------------------------------------- - Ran 125 tests in 0.070s + $ python iptest.py -v IPython.utils + ..........................SS..SSS............................S.S... + ......................................................... + ---------------------------------------------------------------------- + Ran 125 tests in 0.119s + + OK (SKIP=7) - OK (SKIP=7) -Because :file:`iptest` is based on nose, you can use all nose options and -syntax, typing ``iptest -h`` shows all available options. For example, this -lets you run the specific test :func:`test_rehashx` inside the +Because the IPython test machinery is based on nose, you can use all nose +options and syntax, typing ``iptest -h`` shows all available options. For +example, this lets you run the specific test :func:`test_rehashx` inside the :mod:`test_magic` module: .. code-block:: bash - maqroll[scripts]> ./iptest -vv IPython.core.tests.test_magic:test_rehashx - IPython.core.tests.test_magic.test_rehashx(True,) ... ok - IPython.core.tests.test_magic.test_rehashx(True,) ... ok + $ python iptest.py -vv IPython.core.tests.test_magic:test_rehashx + IPython.core.tests.test_magic.test_rehashx(True,) ... ok + IPython.core.tests.test_magic.test_rehashx(True,) ... ok - ---------------------------------------------------------------------- - Ran 2 tests in 0.101s + ---------------------------------------------------------------------- + Ran 2 tests in 0.100s - OK + OK When developing, the :option:`--pdb` and :option:`--pdb-failures` of nose are particularly useful, these drop you into an interactive pdb session at the