Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Code Block
def create_sequential_suite(name) :
    suite = Suite(name)
    for i in range(1, 7) :
        fam = suite.add_family("f" + str(i))
        if i != 1: 
            fam += Trigger("f" + str(i-1) + " == complete")  # or fam.add_family( "f%d == complete" % (i-1) )
        for t in ( "a", "b", "c", "d", "e" ) :
            fam.add_task(t) 
    return suite


For more detailed example please see the user manual


Adding Node attributes

There are several styles for adding node attributes(Repeat,Time,Today,Date,Day,Cron,Clock,DefStatus,Meter,Event,Variable,Label,Trigger, Complete, Limit,Inlimit,Zombie,Late)

Code Block
languagepy
node.add_variable(home,'COURSE')       # c++ style
node.add_limit('limitX',10)            # c++ style

node.add(Edit(home=COURSE),Limit('limitX',10))                       # node.add(<attributes>)  
node = Family('t1',Edit(home=COURSE),Limit('limitX',10),Task('t1')) # constructor. Task(name,<attributes>),  Family(name,Node | <attributes>), Suite(name,Node | <attributes>)
node += Edit(home=COURSE)                                           # node += attribute        - adding a single attribute
node += [ Edit(home=COURSE), Limit('limitX',10) ]                   # node += [ <attributes> ] -  use list to add multiple attributes
node + Edit(home=COURSE) + Limit('limitX',10)                       # node + <attributes>.     - A node must appear on the left hand side. Use brackets to control scope.



...