Example #1
0
 def test_right_number_of_rows(self):
     p = {1: [2, 3], 'b': [4, 5, 6]}
     self.assertEqual(len(list(mergic.table(p))), 5)
Example #2
0
 def test_correct_rows_appear(self):
     p = {1: [2, 3], 'b': [4, 5, 6]}
     rowset = set([(2, 1), (3, 1), (4, 'b'), (5, 'b'), (6, 'b')])
     self.assertEqual(set(mergic.table(p)), rowset)
Example #3
0
 def test_nothing_for_empty(self):
     self.assertEqual(len(list(mergic.table({}))), 0)