##// END OF EJS Templates
First step in reintegrating Jedi...
First step in reintegrating Jedi If Jedi is installed expose a private API use it with prompt toolkit. Jedi does not _yet_ provide all the completion IPython has, so this is still a bit awkward. In order to debug this (and see what is Jedi provided we for now inject a fake Jedi/IPython delimiter in the menu. Jedi completion and this behavior are enabled by default, but could likely be opt-in. Add also a number of debug flags to be able to track why jedi is not working, and/or what completions are found by IPython and not Jedi. That should give us a bit of heads up and feedback to know whether we can remove part of the IPython completer, and more especially if we can drop `python_matches`. Once `python_matches` is dropped and some other of the current matchers are either dropped or converted to the new API, that should simplify the internal quite a bit. That would just be too much for an already BIG pull-request.

File last commit:

r13745:aea65ac0
r23284:3ff1be2e
Show More
__init__.py
38 lines | 1.3 KiB | text/x-python | PythonLexer
Fernando Perez
Make testing easier by exposing a top-level test() function....
r2397 """Testing support (tools to test IPython itself).
"""
Brian Granger
Work to address the review comments on Fernando's branch....
r2498 #-----------------------------------------------------------------------------
Matthias BUSSONNIER
update copyright to 2011/20xx-2011...
r5390 # Copyright (C) 2009-2011 The IPython Development Team
Brian Granger
Work to address the review comments on Fernando's branch....
r2498 #
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Functions
#-----------------------------------------------------------------------------
Fernando Perez
Make testing easier by exposing a top-level test() function....
r2397 # User-level entry point for testing
Thomas Kluyver
Allow any options to be passed through test function
r13742 def test(**kwargs):
Fernando Perez
Make testing easier by exposing a top-level test() function....
r2397 """Run the entire IPython test suite.
Thomas Kluyver
Allow any options to be passed through test function
r13742 Any of the options for run_iptestall() may be passed as keyword arguments.
Paul Ivanov
add example of likely kwargs to test() docstring
r13743
Thomas Kluyver
Fix docstring codeblock
r13745 For example::
Paul Ivanov
add example of likely kwargs to test() docstring
r13743
IPython.test(testgroups=['lib', 'config', 'utils'], fast=2)
will run those three sections of the test suite, using two processes.
Thomas Kluyver
Allow any options to be passed through test function
r13742 """
Fernando Perez
Make testing easier by exposing a top-level test() function....
r2397
# Do the import internally, so that this function doesn't increase total
# import time
Thomas Kluyver
Restore the ability to run tests from a function.
r13740 from .iptestcontroller import run_iptestall, default_options
options = default_options()
Thomas Kluyver
Allow any options to be passed through test function
r13742 for name, val in kwargs.items():
setattr(options, name, val)
Thomas Kluyver
Restore the ability to run tests from a function.
r13740 run_iptestall(options)
Fernando Perez
Make testing easier by exposing a top-level test() function....
r2397
# So nose doesn't try to run this as a test itself and we end up with an
# infinite test loop
test.__test__ = False