Example #1
0
 def test_joins_to_same_thing(self):
     group_of = {1: (1,), 2: (2,)}
     mergic.link_items(group_of, [(1, 2)])
     self.assertIs(group_of[1], group_of[2])
Example #2
0
 def test_joins_to_correct_tuple(self):
     group_of = {1: (1,), 2: (2,)}
     mergic.link_items(group_of, [(1, 2)])
     self.assertEqual(set(group_of[1]), set((1, 2)))
Example #3
0
 def test_doesnt_change_if_already_together(self):
     group = (1, 2)
     group_of = {1: group, 2: group}
     mergic.link_items(group_of, [(1, 2)])
     self.assertIs(group_of[1], group_of[2])