#NEWLINE# def test_chain_len_groups( self ) : #NEWLINE# #INDENT# chain_len_map = { #NEWLINE# #INDENT# 'A' : 1 , #NEWLINE# 'C' : 3 , #NEWLINE# 'B' : 2 , #NEWLINE# 'E' : 3 , #NEWLINE# 'D' : 2 , #NEWLINE# #UNINDENT# } #NEWLINE# expected = { #NEWLINE# #INDENT# 1 : [ 'A' ] , #NEWLINE# 2 : [ 'B' , 'D' ] , #NEWLINE# 3 : [ 'C' , 'E' ] , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertDictEqual ( chain_len_map , ChainMappingRMSDMatrixCalculator . getChainLenGroups ( chain_len_map ) ) #NEWLINE# self . assertItemsEqual ( [ [ 'A' ] , [ 'B' , 'D' ] , [ 'C' , 'E' ] ] , ChainMappingRMSDMatrixCalculator . getPermGroups ( ChainMappingRMSDMatrixCalculator . getChainLenGroups ( chain_len_map ) ) )