Enhance the ordering groups to allow nesting, and create a new "interleaved" order group.
Nesting is helpful to allow for a more modular test code - you can write methods that create a group of functions that execute in some order.
group1=EnforceSequentialOrder()
withgroup1:
foo1()
foo2()
# This will append to the same groupwithgroup1:
foo3()
foo4()
# This will create a group that doesn't care about order:group2=UnorderdGroup()
withgroup2:
bar1()
bar2()
# Now we can do this:withAllowInterleavedOrder():
group1()
group2()
# This means that the following is valid:#1. foo1, foo2, bar1, foo3, foo4, bar2#2. bar2, foo1, bar1, foo2, foo3, foo4## This is invalid:#1. foo2, foo1, ...#2. missing bar# ...# You get the picture :)
Enhance the ordering groups to allow nesting, and create a new "interleaved" order group.
Nesting is helpful to allow for a more modular test code - you can write methods that create a group of functions that execute in some order.