Anonymous avatar Anonymous committed c920de2

mudando a matriz de teste 2x2 de [[1,1],[2,2]] para [[1,2],[3,4]]

Comments (0)

Files changed (2)

     def m(self): return len(self.colunas)
     
     @property
-    def quadrada(self):
-        return self.n == self.m
+    def quadrada(self): return self.n == self.m
         
     def linha(self, n):
         return self.linhas[n]
 import unittest
 from matrices import Matriz
 
-_2_x_2 = Matriz([[1, 1], 
-                 [2, 2]])
+_2_x_2 = Matriz([[1, 2], 
+                 [3, 4]])
                  
 _3_x_3 = Matriz([['A', 'B', 'C'], 
-                ['D', 'E', 'F'],
-                ['G', 'H', 'I']])
+                 ['D', 'E', 'F'],
+                 ['G', 'H', 'I']])
                 
 class TesteMatriz_2_x_2(unittest.TestCase):
     A = _2_x_2
 
     def teste_linhas(self):
-        self.assertEqual(self.A.linhas, [[1, 1], [2, 2]])
-        self.assertEqual(self.A.linha(0), [1, 1])
-        self.assertEqual(self.A.linha(1), [2, 2])
+        self.assertEqual(self.A.linhas, [[1, 2], [3, 4]])
+        self.assertEqual(self.A.linha(0), [1, 2])
+        self.assertEqual(self.A.linha(1), [3, 4])
         
     def teste_colunas(self):
-        self.assertEqual(self.A.colunas, [[1, 2], [1, 2]])
-        self.assertEqual(self.A.coluna(0), [1, 2])
-        self.assertEqual(self.A.coluna(1), [1, 2])
+        self.assertEqual(self.A.colunas, [[1, 3], [2, 4]])
+        self.assertEqual(self.A.coluna(0), [1, 3])
+        self.assertEqual(self.A.coluna(1), [2, 4])
 
     def teste_comparacao(self):
         B = self.A.transposta().transposta()
         self.assertEqual(self.A, B)
         
     def teste_transposta(self):
-        AT = Matriz([[1, 2], 
-                     [1, 2]])
+        AT = Matriz([[1, 3], 
+                     [2, 4]])
         self.assertEqual(self.A.transposta(), AT)
         
 
                      ['C', 'F', 'I']])
         self.assertEqual(self.A.transposta(), AT)
         
+        
 class TestePropriedades(unittest.TestCase):
     A = _2_x_2
     B = _3_x_3
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.