def test_with_settings_with_other_context_managers():
 env.testval1 = 'outer 1'
 prev_lcwd = env.lcwd
 def some_task():
  eq_(env.testval1, 'inner 1')
  ok_(env.lcwd.endswith('here'))
 decorated_task = decorators.with_settings(lcd('here'), testval1='inner 1')(some_task)
 decorated_task()
 ok_(env.testval1, 'outer 1')
 eq_(env.lcwd, prev_lcwd)

def test_with_settings_with_other_context_managers ( ) : env . testval1 = 'outer 1' prev_lcwd = env . lcwd def some_task ( ) : eq_ ( env . testval1 , 'inner 1' ) ok_ ( env . lcwd . endswith ( 'here' ) ) decorated_task = decorators . with_settings ( lcd ( 'here' ) , testval1 = 'inner 1' ) ( some_task ) decorated_task ( ) ok_ ( env . testval1 , 'outer 1' ) eq_ ( env . lcwd , prev_lcwd )
with_settings() should take other context managers .