##// END OF EJS Templates
Doc updates to testing to reflect recent changes....
Fernando Perez -
Show More
@@ -23,7 +23,7 b" name = 'ipython'"
23 development = True # change this to False to do a release
23 development = True # change this to False to do a release
24 version_base = '0.11'
24 version_base = '0.11'
25 branch = 'ipython'
25 branch = 'ipython'
26 revision = '1321'
26 revision = '1340'
27
27
28 if development:
28 if development:
29 if branch == 'ipython':
29 if branch == 'ipython':
@@ -56,6 +56,9 b' and similarly, you can execute the built-in test suite with:'
56 python iptest.py
56 python iptest.py
57
57
58
58
59 This script manages intelligently both nose and trial, choosing the correct
60 test system for each of IPython's components.
61
59 Once you have either installed it or at least configured your system to be
62 Once you have either installed it or at least configured your system to be
60 able to import IPython, you can run the tests with:
63 able to import IPython, you can run the tests with:
61
64
@@ -65,57 +68,54 b' able to import IPython, you can run the tests with:'
65
68
66 This should work as long as IPython can be imported, even if you haven't fully
69 This should work as long as IPython can be imported, even if you haven't fully
67 installed the user-facing scripts yet (common in a development environment).
70 installed the user-facing scripts yet (common in a development environment).
71 Once you have installed IPython, you will have available system-wide a script
72 called :file:`iptest` that does the exact same as the :file:`iptest.py` script
73 in the source directory, so you can then test simply with:
74
75 .. code-block:: bash
76
77 iptest [args]
68
78
69
79
70 Regardless of how you run things, you should eventually see something like:
80 Regardless of how you run things, you should eventually see something like:
71
81
72 .. code-block:: bash
82 .. code-block:: bash
73
83
74 ************************************************************************
84 **********************************************************************
75 Ran 10 test groups in 35.228s
85 Ran 11 test groups in 64.117s
76
86
77 OK
87 OK
78
88
79 If not, there will be a message indicating which test group failed and how to
80 rerun that group individually.
81
82 But IPython ships with an entry point script called :file:`iptest` that offers
83 fine-grain control over the test process and is particularly useful for
84 developers; this script also manages intelligently both nose and trial,
85 choosing the correct test system for each of IPython's components. Running
86 :file:`iptest` without arguments gives output identical to that above, but with
87 it, you can also run specific tests with fine control. The :file:`iptest`
88 script is installed with IPython, but if you are running from a source tree,
89 you can find it in the :file:`IPython/scripts` directory and you can run
90 directly from there.
91
89
92 For example, this tests the :mod:`IPython.utils` subpackage, the :option:`-v`
90 If not, there will be a message indicating which test group failed and how to
93 option shows progress indicators:
91 rerun that group individually. For example, this tests the
92 :mod:`IPython.utils` subpackage, the :option:`-v` option shows progress
93 indicators:
94
94
95 .. code-block:: bash
95 .. code-block:: bash
96
96
97 maqroll[ipython]> cd IPython/scripts/
97 $ python iptest.py -v IPython.utils
98 maqroll[scripts]> ./iptest -v IPython.utils
98 ..........................SS..SSS............................S.S...
99 ..........................SS..SSS............................S.S.........
99 .........................................................
100 ...................................................
101 ----------------------------------------------------------------------
100 ----------------------------------------------------------------------
102 Ran 125 tests in 0.070s
101 Ran 125 tests in 0.119s
103
102
104 OK (SKIP=7)
103 OK (SKIP=7)
105
104
106 Because :file:`iptest` is based on nose, you can use all nose options and
105
107 syntax, typing ``iptest -h`` shows all available options. For example, this
106 Because the IPython test machinery is based on nose, you can use all nose
108 lets you run the specific test :func:`test_rehashx` inside the
107 options and syntax, typing ``iptest -h`` shows all available options. For
108 example, this lets you run the specific test :func:`test_rehashx` inside the
109 :mod:`test_magic` module:
109 :mod:`test_magic` module:
110
110
111 .. code-block:: bash
111 .. code-block:: bash
112
112
113 maqroll[scripts]> ./iptest -vv IPython.core.tests.test_magic:test_rehashx
113 $ python iptest.py -vv IPython.core.tests.test_magic:test_rehashx
114 IPython.core.tests.test_magic.test_rehashx(True,) ... ok
114 IPython.core.tests.test_magic.test_rehashx(True,) ... ok
115 IPython.core.tests.test_magic.test_rehashx(True,) ... ok
115 IPython.core.tests.test_magic.test_rehashx(True,) ... ok
116
116
117 ----------------------------------------------------------------------
117 ----------------------------------------------------------------------
118 Ran 2 tests in 0.101s
118 Ran 2 tests in 0.100s
119
119
120 OK
120 OK
121
121
General Comments 0
You need to be logged in to leave comments. Login now