Пример #1
0
 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)
Пример #2
0
 def test_longestpath_one_edge(self):
     edgeMap = {1: set([2])}
     newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap)
     self.assertEquals(edgeMap, newEdgeMap)
Пример #3
0
 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)
Пример #4
0
 def test_longestpath_empty(self):
     edgeMap = {}
     newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap)
     self.assertEquals(edgeMap, newEdgeMap)
Пример #5
0
 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)
Пример #6
0
 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)
Пример #7
0
 def test_longestpath_one_edge(self):
     edgeMap = { 1: set([2])}
     newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap)
     self.assertEquals(edgeMap, newEdgeMap)
Пример #8
0
 def test_longestpath_empty(self):
     edgeMap = {}
     newEdgeMap = genotype_mp_hunter._longestPathEdgeMap(edgeMap)
     self.assertEquals(edgeMap, newEdgeMap)