def test_FragmentationDetermineFragmentsWithBreakingAndGrouping(self): self.fragmentation.setFragmentGroupCount(2) self.fragmentation.breakBonds() self.fragmentation.determineFragments() self.fragmentation.doFragmentGrouping() self.assertEqual(lenOfLists(self.fragmentation.getFragments()), [28, 26, 29, 21, 34])
def test_FragmentationDetermineFragmentsWithBreakingAndGroupingTriple( self): self.fragmentation.setFragmentGroupCount(3) self.fragmentation.breakBonds() self.fragmentation.determineFragments() self.fragmentation.doFragmentGrouping() self.assertEqual(lenOfLists(self.fragmentation.getFragments()), [40, 43, 45, 10])
def test_FragmentationDetermineFragmentsWithBreaking(self): self.fragmentation.breakBonds() self.fragmentation.determineFragments() self.assertEqual(lenOfLists(self.fragmentation.getFragments()), [7, 21, 12, 14, 15, 14, 7, 14, 24, 10])
def test_lenOfLists(self): test_array = [[1,2,3,4],[1,2,3,4],[5,4,3,2,1]] # returns a list of the individual sub lists self.assertEqual( util.lenOfLists(test_array), [4,4,5] )
def test_FragmentationDetermineFragmentsWithBreakingAndGroupingTriple(self): self.fragmentation.setFragmentGroupCount(3) self.fragmentation.breakBonds() self.fragmentation.determineFragments() self.fragmentation.doFragmentGrouping() self.assertEqual(lenOfLists(self.fragmentation.getFragments()), [40, 43, 45, 10])