Exemple #1
0
 def test_empty(self):
     m = []
     rotateMatrix.layered(m)
     self.assertEqual(m,[])
Exemple #2
0
 def test_no_square_matrix(self):
     m = [[3,2,1],[5,7]]
     rotateMatrix.layered(m)
     self.assertEqual(m,[[3,2,1],[5,7]])
Exemple #3
0
 def test_same_elemets(self):
     m = [[1,1],[1,1]]
     rotateMatrix.layered(m)
     self.assertEqual(m,[[1,1],[1,1]])
Exemple #4
0
 def test_three_by_three(self):
     m = [[1,2,3],[4,5,6],[7,8,9]]
     rotateMatrix.layered(m)
     self.assertEqual(m,[[7,4,1],[8,5,2],[9,6,3]])
Exemple #5
0
 def test_two_by_two(self):
     m = [[1,2],[3,4]]
     rotateMatrix.layered(m)
     self.assertEqual(m,[[3,1],[4,2]])
Exemple #6
0
 def test_single_element(self):
     m = [1]
     rotateMatrix.layered(m)
     self.assertEqual(m,[1])