#NEWLINE# def test_fail( ) : #NEWLINE# #INDENT# c3 = Context ( ) #NEWLINE# res1 = c3 . set ( a = 1 ) #NEWLINE# res2 = c3 . set ( b = 2 ) #NEWLINE# assert_raises ( ContextRestoreError , res2 . restore ) #NEWLINE# assert ( c3 . b == 2 ) #NEWLINE# assert ( c3 . a == 1 ) #NEWLINE# res2 . restore ( ) #NEWLINE# res1 . restore ( )