Exemplo n.º 1
0
 def test_count(self):
     """Ensure tabulate accepts specific count"""
     t = mi.tabulate(lambda x: 2 * x, -1)
     f = (next(t), next(t), next(t))
     self.assertEqual(f, (-2, 0, 2))
Exemplo n.º 2
0
 def test_simple_tabulate(self):
     """Test the happy path"""
     t = mi.tabulate(lambda x: x)
     f = tuple([next(t) for _ in range(3)])
     self.assertEqual(f, (0, 1, 2))
Exemplo n.º 3
0
 def test_simple_tabulate(self):
     """Test the happy path"""
     t = mi.tabulate(lambda x: x)
     f = tuple([next(t) for _ in range(3)])
     self.assertEqual(f, (0, 1, 2))
Exemplo n.º 4
0
 def test_count(self):
     """Ensure tabulate accepts specific count"""
     t = mi.tabulate(lambda x: 2 * x, -1)
     f = (next(t), next(t), next(t))
     self.assertEqual(f, (-2, 0, 2))