def test_lazy_roles():
 @roles('r1')
 def command():
  pass
 eq_hosts(command, ['a', 'b'], env={'roledefs': lazy_role})

def test_lazy_roles ( ) : @ roles ( 'r1' ) def command ( ) : pass eq_hosts ( command , [ 'a' , 'b' ] , env = { 'roledefs' : lazy_role } )
roles may be callables returning lists .