Fix test_get_key_in_path() and test_get_path() for full_path_mapper
@@ -163,24 +163,24 @@ class MigrationGraphComplexTest(unittest.TestCase):
def test_get_path(self):
self.fpm_li.assign_cost_to_graph() # use 'hop_distance'
- paths = [*self.fpm_li.get_path()]
+ paths = [*self.fpm_li.get_path(flip_hops=False)]
p_strings = {"->".join(map(str, get_hop_site_sequence(ipath, start_u=u))) for u, ipath in paths}
self.assertIn("5->7->5", p_strings)
# convert each pathway to a string representation
- paths = [*self.fpm_li.get_path(max_val=2.0)]
+ paths = [*self.fpm_li.get_path(max_val=2.0,flip_hops=False)]
p_strings = {"->".join(map(str, get_hop_site_sequence(ipath, start_u=u))) for u, ipath in paths}
# After checking trimming the graph more hops are needed for the same path
self.assertIn("5->3->7->2->5", p_strings)
self.fpm_mg.assign_cost_to_graph() # use 'hop_distance'
- paths = [*self.fpm_mg.get_path()]
+ paths = [*self.fpm_mg.get_path(flip_hops=False)]
p_strings = {"->".join(map(str, get_hop_site_sequence(ipath, start_u=u))) for u, ipath in paths}
self.assertIn("1->0->1", p_strings)
def test_get_key_in_path(self):
self.fpm_li.assign_cost_to_graph() # use 'hop_distance'
- paths = [*self.fpm_li.get_path()]
+ paths = [*self.fpm_li.get_path(flip_hops=False)]
hop_seq_info = [get_hop_site_sequence(ipath, start_u=u, key="hop_distance") for u, ipath in paths]
hop_distances = {}
