Package dtest :: Class DTester
[show private | hide private]
[frames | no frames]

Type DTester

object --+        
         |        
  _Verbose --+    
             |    
        Thread --+
                 |
                DTester


Represents an elementary DTest stakeholder.

DTest falls into (eventually) communicating and concurrent processes, the DTesters, which will be runned concurrently by a DTestMaster. A DTester contains sequential steps (either initialize or run steps) specified through addInitializeStep and/or addRunStep DTester method. FIXME: describe DTESTMASTER
Method Summary
  __init__(self, name, session, timeout)
Create a DTester using the specified session handler.
  addInitializeStep(self, stepmethod, *args, **kwargs)
  addRunStep(self, stepmethod, *args, **kwargs)
  barrier(self, barrierId, timeout)
wait until every stakeholder have reached the specified barrier.
  expectFromCommand(self, pattern, timeout)
  getFile(self, srcPath, dstPath)
  initialize(self)
  ok(self, *args, **kwargs)
ok TAP method.
  putFile(self, srcPath, dstPath)
  registerForBarrier(self, barrierId)
register for DTest barrier barrierId in the DTestMaster.
  run(self)
  runCommand(self, command, environ)
  sendToCommand(self, string)
  terminateCommand(self)
  waitCommandTermination(self, timeout)
  waitDuring(self, duration)
  __createExpectTimer(self, timeout, msg)
  __expectTimedOut(self, msg)
  __getName(self)
  __getStderr(self)
  __getStdin(self)
  __getStdout(self)
  __isbound(cls, function)
(Class method)
  __isfunction_or_unboundmethod(cls, function)
(Class method)
  __setStderr(self, file)
  __setStdin(self, file)
  __setStdout(self, file)
    Inherited from Thread
  __repr__(self)
  getName(self)
  isAlive(self)
  isDaemon(self)
  join(self, timeout)
  setDaemon(self, daemonic)
  setName(self, name)
  start(self)
  _set_daemon(self)
    Inherited from _Verbose
  _note(self, format, *args)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Property Summary
  name
  stderr
  stdin
  stdout

Class Variable Summary
Formatter fmt = <logging.Formatter instance at 0xb7c2478c>
Logger logger = <logging.Logger instance at 0xb7c2482c>
StreamHandler sh = <logging.StreamHandler instance at 0xb7c247ec>
classobj InvalidStepFunctionException = dtest.dtester.InvalidStepFunctionException
classobj NoRunningCommandException = dtest.dtester.NoRunningCommandException
classobj SessionUnableToRunCommandException = dtest.dtester.SessionUnableToRunCommandException
classobj StepFailedException = dtest.dtester.StepFailedException
classobj StepFirstArgNotDTesterNorSelfException = dtest.dtester.StepFirstArgNotDTesterNorSelfException
classobj StepNotCallableException = dtest.dtester.StepNotCallableException
    Inherited from Thread
bool _Thread__initialized = False

Instance Method Details

__init__(self, name, session=<dtest.SessionHandler object at 0xb7c2472c>, timeout=10)
(Constructor)

Create a DTester using the specified session handler.
Parameters:
name - the name of the DTester
           (type=string)
session - the session handler associated with this instance of DTester.
           (type=SessionHandler)
timeout - the timeout (in seconds) used for each potentially timed call.
           (type=int)
Overrides:
threading.Thread.__init__

barrier(self, barrierId, timeout=None)

wait until every stakeholder have reached the specified barrier.

If timeout is not specified the DTester instance-wide timeout is used. If specified then the specified timeout is used.
Parameters:
barrierId - the barrier identifier
           (type=string)
timeout - the timeout (in seconds) to be used for waiting for others to reach (if any) to reach the barrier. 0 means never timeout.
           (type=int)

ok(self, *args, **kwargs)

ok TAP method.

registerForBarrier(self, barrierId)

register for DTest barrier barrierId in the DTestMaster.

This method does not need to be called explicitly. The DTester will generate the call as soon as a 'barrier' run step is added through addRunStep method.
Parameters:
barrierId - the barrier identifier
           (type=string)

Property Details

name

Get Method:
__getName(self)

stderr

Get Method:
__getStderr(self)
Set Method:
__setStderr(self, file)

stdin

Get Method:
__getStdin(self)
Set Method:
__setStdin(self, file)

stdout

Get Method:
__getStdout(self)
Set Method:
__setStdout(self, file)

Class Variable Details

fmt

Type:
Formatter
Value:
<logging.Formatter instance at 0xb7c2478c>                             

logger

Type:
Logger
Value:
<logging.Logger instance at 0xb7c2482c>                                

sh

Type:
StreamHandler
Value:
<logging.StreamHandler instance at 0xb7c247ec>                         

Generated by Epydoc 2.1 on Wed Jun 13 18:12:48 2007 http://epydoc.sf.net