Format: text/plain
⬇ Download File (923 B)
   1  =======================
   2   Combo testing example
   3  =======================
   4  
   5  This is a simple example that mixes ipython doctests::
   6  
   7      In [1]: import code
   8  
   9      In [2]: 2**12
  10      Out[2]: 4096
  11  
  12  with command-line example information that does *not* get executed::
  13  
  14      $ mpirun -n 4 ipengine --controller-port=10000 --controller-ip=host0
  15  
  16  and with literal examples of Python source code::
  17  
  18      controller = dict(host='myhost',
  19  		      engine_port=None, # default is 10105
  20  		      control_port=None,
  21  		      )
  22  
  23      # keys are hostnames, values are the number of engine on that host
  24      engines = dict(node1=2,
  25  		   node2=2,
  26  		   node3=2,
  27  		   node3=2,
  28  		   )
  29  
  30      # Force failure to detect that this test is being run.
  31      1/0
  32  
  33  These source code examples are executed but no output is compared at all.  An
  34  error or failure is reported only if an exception is raised.
  35  
  36  NOTE: the execution of pure python blocks is not yet working!
  37