def test_settings_with_other_context_managers():
 env.testval1 = 'outer 1'
 prev_lcwd = env.lcwd
 with settings(lcd('here'), testval1='inner 1'):
  eq_(env.testval1, 'inner 1')
  ok_(env.lcwd.endswith('here'))
 ok_(env.testval1, 'outer 1')
 eq_(env.lcwd, prev_lcwd)

def test_settings_with_other_context_managers ( ) : env . testval1 = 'outer 1' prev_lcwd = env . lcwd with settings ( lcd ( 'here' ) , testval1 = 'inner 1' ) : eq_ ( env . testval1 , 'inner 1' ) ok_ ( env . lcwd . endswith ( 'here' ) ) ok_ ( env . testval1 , 'outer 1' ) eq_ ( env . lcwd , prev_lcwd )
settings() should take other context managers .