def test_roles_decorator_overrides_env_roles():
 @roles('r1')
 def command():
  pass
 eq_effective_roles(command, ['r1'], env={'roledefs': fake_roles, 'roles': ['r2']})

def test_roles_decorator_overrides_env_roles ( ) : @ roles ( 'r1' ) def command ( ) : pass eq_effective_roles ( command , [ 'r1' ] , env = { 'roledefs' : fake_roles , 'roles' : [ 'r2' ] } )
if @roles is used it replaces any env .