...
The following show alternative styles that produce the same definition.
Code Block |
---|
| defs = Defs().add(
Suite("s1").add(
Limit("limitName4", 10),
Family("f1").add(
InLimit("limitName4","/s1/f1",2),
[ Task("t{}".format(t))
for t in range(1,4) ]))) |
| |
defs= []
defs.s1 += [ Limit("limitName4", 10),Family("f1") ]
defs.s1.f1 += [ InLimit("limitName4","/s1/f1",2),
[ Task("t{}".format(t))
for t in range(1,4) ] ] |
|
Code Block |
---|
| with Defs() as defs:
with defs.add_suite("s1") as s1:
s1.add_limit( "limitName4", 10 )
with s1.add_family("f1") as f1:
f1.add_inlimit( "limitName4","/s1/f1",2)
f1 += [ Task("t{}".format(t))
for t in range(1,4) ] |
|