示例#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]])
示例#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]])
示例#3
0
 def test_single_element_zero(self):
     m = [0]
     zeroMatrix.onePass(m)
     self.assertEqual(m,[0])
示例#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]])
示例#5
0
 def test_single_element_one(self):
     m = [1]
     zeroMatrix.onePass(m)
     self.assertEqual(m,[1])