Example #1
0
 def test_three_by_two_two_zero(self):
     m = [[1,2],[3,4],[0,0]]
     zeroMatrix.onePass(m)
     self.assertEqual(m, [[0,0],[0,0],[0,0]])
Example #2
0
 def test_two_by_three_one_zero(self):
     m = [[1,0,2],[3,4,5]]
     zeroMatrix.onePass(m)
     self.assertEqual(m, [[0,0,0],[3,0,5]])
Example #3
0
 def test_single_element_zero(self):
     m = [0]
     zeroMatrix.onePass(m)
     self.assertEqual(m,[0])
Example #4
0
 def test_two_by_two_no_zeros(self):
     m = [[1,2],[3,4]]
     zeroMatrix.onePass(m)
     self.assertEqual(m, [[1,2],[3,4]])
Example #5
0
 def test_single_element_one(self):
     m = [1]
     zeroMatrix.onePass(m)
     self.assertEqual(m,[1])