Debian Codegraph @

doc/samples/tsetup.py

raw symbols SCIP
1 ### task setup env. good for functional tests!
2 DOIT_CONFIG = {'verbosity': 2,
3 'default_tasks': ['withenvX', 'withenvY']}
4
5 def start(name):
6 print("start %s" % name)
7 def stop(name):
8 print("stop %s" % name)
9
10 def task_setup_sample():
11 for name in ('setupX', 'setupY'):
12 yield {'name': name,
13 'actions': [(start, (name,))],
14 'teardown': [(stop, (name,))],
15 }
16
17 def task_withenvX():
18 for fin in ('a','b','c'):
19 yield {'name': fin,
20 'actions':['echo x %s' % fin],
21 'setup': ['setup_sample:setupX'],
22 }
23
24 def task_withenvY():
25 return {'actions':['echo y'],
26 'setup': ['setup_sample:setupY'],
27 }