##// END OF EJS Templates
Option to spew subprocess streams during tests...
Option to spew subprocess streams during tests This supersedes PR #4268. Run the tests with '--subproc-streams show' to show output from subprocesses (kernels, IPython.parallel components) in the terminal, or with '--subproc-streams discard' to send it to /dev/null. By default (or with '--subproc-streams capture') the output is piped, captured and displayed only when tests fail. But in some situations, a test fails because of an error which actually occurred earlier, so you have to see all the output.

File last commit:

r9190:20a102a5
r13824:d77e2f51
Show More
task2.py
50 lines | 924 B | text/x-python | PythonLexer
#!/usr/bin/env python
# encoding: utf-8
from IPython.parallel import Client
import time
import sys
flush = sys.stdout.flush
rc = Client()
v = rc.load_balanced_view()
mux = rc[:]
for i in range(24):
v.apply(time.sleep, 1)
for i in range(6):
time.sleep(1.0)
print("Queue status (vebose=False)")
print(v.queue_status(verbose=False))
flush()
for i in range(24):
v.apply(time.sleep, 1)
for i in range(6):
time.sleep(1.0)
print("Queue status (vebose=True)")
print(v.queue_status(verbose=True))
flush()
for i in range(12):
v.apply(time.sleep, 2)
print("Queue status (vebose=True)")
print(v.queue_status(verbose=True))
flush()
# qs = v.queue_status(verbose=True)
# queued = qs['scheduled']
for msg_id in v.history[-4:]:
v.abort(msg_id)
for i in range(6):
time.sleep(1.0)
print("Queue status (vebose=True)")
print(v.queue_status(verbose=True))
flush()