#NEWLINE# def test_set_flat_unpruned( ) : #NEWLINE# #INDENT# pairs = [ ( 'l_0_i' , '0' ) , ( 'l_2_i' , '' ) , ( 'l_3_i' , '3' ) ] #NEWLINE# schema = List . named ( 'l' ) . of ( Integer . named ( 'i' ) ) . using ( prune_empty = False ) #NEWLINE# el = schema . from_flat ( pairs ) #NEWLINE# eq_ ( len ( schema2 ) , 4 ) #NEWLINE# eq_ ( el . value , [ 0 , None , None , 3 ] ) #NEWLINE# schema2 = schema . using ( maximum_set_flat_members = 2 ) #NEWLINE# el = schema2 . from_flat ( pairs ) #NEWLINE# eq_ ( len ( el ) , 2 ) #NEWLINE# eq_ ( el . value , [ 0 , None ] )