def lines(gen, n): nums = list(gen(n)) table = times_table.table(nums) return times_table.table_lines(nums, table)
def test_two_times_table(self): self.assertEquals(times_table.table(self.nums[:2]), [[1, 2], [2, 4]])