##// END OF EJS Templates
Complete first pass on testing system. All tests pass on my box. Whew....
Complete first pass on testing system. All tests pass on my box. Whew. We now have a first cut of a functioning testing system. Many examples had to be disabled (with a proper decorator), but now we can begin building a robust test suite for all of IPython. The big remaining todo is to fix the handling of the ipython/test namespace synchronization, which is still not 100% correct. Once that is done, some of the currently skipped tests will be reactivated.

File last commit:

r1435:da07a079
r1435:da07a079
Show More
test_contexts.py
41 lines | 973 B | text/x-python | PythonLexer
from __future__ import with_statement
#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()
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
with pfor('i',sequence) as pr:
print x[i]
print pr.x + pr.y