##// END OF EJS Templates
Merging Fernando's trunk (fp-trunk-dev) and Brian's edits (fp-review)....
Merging Fernando's trunk (fp-trunk-dev) and Brian's edits (fp-review). This is a huge merge of months worth of work by Fernando and Brian. Some highlights: * The test suite has been ported to use the new APIs. * The test suite runs and passes on all platforms!!! * The IPython Sphinx directive has been updated to use the new APIs. * %history works again. * New %tb magic for showing last traceback. * Significant design improvements in the config loaders and applications. * Zillions of bugs fixed. * Completely new %pylab implementation that uses the new GUI support. This allows pylab to be enabled *at runtime*. * Many other things.

File last commit:

r1960:51f38f50
r2515:08ca9176 merge
Show More
test_contexts.py
46 lines | 1.1 KiB | text/x-python | PythonLexer
Brian Granger
Fixing misc testing related things.
r1960 # Tell nose to skip this module
__test__ = {}
Fernando Perez
Partial fixes for 2.4 compatibility. Unfinished....
r1706 #from __future__ import with_statement
# XXX This file is currently disabled to preserve 2.4 compatibility.
Fernando Perez
Complete first pass on testing system. All tests pass on my box. Whew....
r1435
Fernando Perez
Moved context tests to separate file
r1406 #def test_simple():
if 0:
# XXX - for now, we need a running cluster to be started separately. The
# daemon work is almost finished, and will make much of this unnecessary.
from IPython.kernel import client
mec = client.MultiEngineClient(('127.0.0.1',10105))
try:
mec.get_ids()
except ConnectionRefusedError:
import os, time
os.system('ipcluster -n 2 &')
time.sleep(2)
mec = client.MultiEngineClient(('127.0.0.1',10105))
mec.block = False
import itertools
c = itertools.count()
parallel = RemoteMultiEngine(mec)
mec.pushAll()
Fernando Perez
Partial fixes for 2.4 compatibility. Unfinished....
r1706 ## with parallel as pr:
## # A comment
## remote() # this means the code below only runs remotely
## print 'Hello remote world'
## x = range(10)
## # Comments are OK
## # Even misindented.
## y = x+1
Fernando Perez
Moved context tests to separate file
r1406
Fernando Perez
Partial fixes for 2.4 compatibility. Unfinished....
r1706 ## with pfor('i',sequence) as pr:
## print x[i]
Fernando Perez
Moved context tests to separate file
r1406
print pr.x + pr.y