##// END OF EJS Templates
Allow any options to be passed through test function
Thomas Kluyver -
Show More
@@ -1,31 +1,32 b''
1 """Testing support (tools to test IPython itself).
1 """Testing support (tools to test IPython itself).
2 """
2 """
3
3
4 #-----------------------------------------------------------------------------
4 #-----------------------------------------------------------------------------
5 # Copyright (C) 2009-2011 The IPython Development Team
5 # Copyright (C) 2009-2011 The IPython Development Team
6 #
6 #
7 # Distributed under the terms of the BSD License. The full license is in
7 # Distributed under the terms of the BSD License. The full license is in
8 # the file COPYING, distributed as part of this software.
8 # the file COPYING, distributed as part of this software.
9 #-----------------------------------------------------------------------------
9 #-----------------------------------------------------------------------------
10
10
11 #-----------------------------------------------------------------------------
11 #-----------------------------------------------------------------------------
12 # Functions
12 # Functions
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14
14
15 # User-level entry point for testing
15 # User-level entry point for testing
16 def test(all=False):
16 def test(**kwargs):
17 """Run the entire IPython test suite.
17 """Run the entire IPython test suite.
18
18
19 For fine-grained control, you should use the :file:`iptest` script supplied
19 Any of the options for run_iptestall() may be passed as keyword arguments.
20 with the IPython installation."""
20 """
21
21
22 # Do the import internally, so that this function doesn't increase total
22 # Do the import internally, so that this function doesn't increase total
23 # import time
23 # import time
24 from .iptestcontroller import run_iptestall, default_options
24 from .iptestcontroller import run_iptestall, default_options
25 options = default_options()
25 options = default_options()
26 options.all = all
26 for name, val in kwargs.items():
27 setattr(options, name, val)
27 run_iptestall(options)
28 run_iptestall(options)
28
29
29 # So nose doesn't try to run this as a test itself and we end up with an
30 # So nose doesn't try to run this as a test itself and we end up with an
30 # infinite test loop
31 # infinite test loop
31 test.__test__ = False
32 test.__test__ = False
General Comments 0
You need to be logged in to leave comments. Login now