#NEWLINE# def test_mutate_slices( ) : #NEWLINE# #INDENT# schema = List . named ( 'l' ) . of ( Integer . named ( 'i' ) ) #NEWLINE# el = schema ( ) #NEWLINE# canary = [ ] #NEWLINE# el . extend ( [ '3' , '4' ] ) #NEWLINE# canary . extend ( [ 3 , 4 ] ) #NEWLINE# el [ 0 : 1 ] = [ '1' , '2' , '3' ] #NEWLINE# canary [ 0 : 1 ] = [ 1 , 2 , 3 ] #NEWLINE# eq_ ( el . value , [ 1 , 2 , 3 , 4 ] ) #NEWLINE# eq_ ( canary , [ 1 , 2 , 3 , 4 ] ) #NEWLINE# del el [ 2 : ] #NEWLINE# del canary [ 2 : ] #NEWLINE# assert ( el . value == [ 1 , 2 ] ) #NEWLINE# assert ( canary == [ 1 , 2 ] )