File: getargs_group.py

package info (click to toggle)
doit 0.25.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,404 kB
  • ctags: 1,504
  • sloc: python: 11,084; makefile: 111; ansic: 14
file content (20 lines) | stat: -rw-r--r-- 455 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
def task_compute():
   def comp(x):
       return {'x':x}
   yield {'name': '5',
          'actions': [ (comp, [5]) ]
          }
   yield {'name': '7',
          'actions': [ (comp, [7]) ]
          }


def show_getargs(values):
    print values
    assert sum(v['x'] for v in values.itervalues()) == 12

def task_args_dict():
  return {'actions': [show_getargs],
          'getargs': {'values': ('compute', None)},
          'verbosity': 2,
          }