Example #1
0
 def test_map_creates_new_instance(self):
     rows = [0, 1]
     cols = [0, 1]
     m = OrderedMatrix(rows, cols, default=0)
     n = m.map(lambda x: x + 1)
     self.assertEqual(m[0][0], 0)
Example #2
0
 def test_map_creates_new_instance(self):
     rows = [0, 1]
     cols = [0, 1]
     m = OrderedMatrix(rows, cols, default=0)
     n = m.map(lambda x: x + 1)
     self.assertEqual(m[0][0], 0)
Example #3
0
 def test_map(self):
     rows = [0, 1]
     cols = [0, 1]
     m = OrderedMatrix(rows, cols, default=0)
     n = m.map(lambda x: x + 1)
     self.assertTrue(n[0][0] == n[0][1] == n[1][0] == n[1][1] == 1)
Example #4
0
 def test_map(self):
     rows = [0, 1]
     cols = [0, 1]
     m = OrderedMatrix(rows, cols, default=0)
     n = m.map(lambda x: x + 1)
     self.assertTrue(n[0][0] == n[0][1] == n[1][0] == n[1][1] == 1)