def test_settings_clean_revert():
 env.modified = 'outer'
 env.notmodified = 'outer'
 with settings(modified='inner', notmodified='inner', inner_only='only', clean_revert=True):
  eq_(env.modified, 'inner')
  eq_(env.notmodified, 'inner')
  eq_(env.inner_only, 'only')
  env.modified = 'modified internally'
 eq_(env.modified, 'modified internally')
 ok_(('inner_only' not in env))

def test_settings_clean_revert ( ) : env . modified = 'outer' env . notmodified = 'outer' with settings ( modified = 'inner' , notmodified = 'inner' , inner_only = 'only' , clean_revert = True ) : eq_ ( env . modified , 'inner' ) eq_ ( env . notmodified , 'inner' ) eq_ ( env . inner_only , 'only' ) env . modified = 'modified internally' eq_ ( env . modified , 'modified internally' ) ok_ ( ( 'inner_only' not in env ) )
settings should only revert values matching input values .