def test_longestpath_three_edges_all_longest(self): edgeMap = {1: [2], 3: [4], 5: [6]} newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap) self.assertEquals({1: set([2]), 3: set([4]), 5: set([6])}, newEdgeMap)
def test_longestpath_one_edge(self): edgeMap = {1: set([2])} newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap) self.assertEquals(edgeMap, newEdgeMap)
def test_longestpath_two_edges_one_child(self): edgeMap = {1: [2, 3], 2: [3]} newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap) # path from 1 -> 3 is redundant and shorter than 1 -> 2, 2 -> 3 self.assertEquals({1: set([2]), 2: set([3])}, newEdgeMap)
def test_longestpath_empty(self): edgeMap = {} newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap) self.assertEquals(edgeMap, newEdgeMap)
def test_longestpath_three_edges_all_longest(self): edgeMap = { 1: [2], 3: [4], 5: [6]} newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap) self.assertEquals({ 1: set([2]), 3: set([4]), 5: set([6])}, newEdgeMap)
def test_longestpath_two_edges_one_child(self): edgeMap = { 1: [2, 3], 2: [3]} newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap) # path from 1 -> 3 is redundant and shorter than 1 -> 2, 2 -> 3 self.assertEquals({ 1: set([2]), 2: set([3])}, newEdgeMap)
def test_longestpath_one_edge(self): edgeMap = { 1: set([2])} newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap) self.assertEquals(edgeMap, newEdgeMap)