test for Matrix method minor()
(self)
| 133 | assert str(a) == "|1,2,3|\n|2,4,5|\n|6,7,8|\n" |
| 134 | |
| 135 | def test_minor(self) -> None: |
| 136 | """ |
| 137 | test for Matrix method minor() |
| 138 | """ |
| 139 | a = Matrix([[1, 2, 3], [2, 4, 5], [6, 7, 8]], 3, 3) |
| 140 | minors = [[-3, -14, -10], [-5, -10, -5], [-2, -1, 0]] |
| 141 | for x in range(a.height()): |
| 142 | for y in range(a.width()): |
| 143 | assert minors[x][y] == a.minor(x, y) |
| 144 | |
| 145 | def test_cofactor(self) -> None: |
| 146 | """ |