...
The following examples show alternative styles that produce the same definition:
Code Block |
---|
| defs = Defs().add(
Suite("s1").add(
Task("t1"),
Task("t2").add(
Trigger("t1 == active and t3 == aborted"),
Complete("t3 == complete")),
Task("t3"))) |
|
Code Block |
---|
| defs = Defs().add(Suite("s1"))
defs.s1 += [ Task("t{}".format(i)) for i in range(1,4) ]
defs.s1.t2 += [ Trigger("t1 == active and t3 == aborted"),
Complete("t3 == complete") ] |
|