def init_zero_matrix_with_new_rank_value(self): self.matrix = Matrix.make_random(self.rows, self.rows, 0, 1) return self.get_matrix_as_list()
def test_is_matrix_not_square(self): test_matrix = Matrix.make_random(3, 2) self.assertEqual(test_matrix.is_matrix_square(), 0)
def test_is_matrix_square(self): test_matrix = Matrix.make_random(3, 3) self.assertEqual(test_matrix.is_matrix_square(), True)
def test_is_correct_index(self): test_matrix = Matrix.make_random(3, 3) self.assertEqual(test_matrix.is_correct_index(4, 3), False)
def test_can_calculate_determinant_of_matrix1x1(self): test_matrix = Matrix.make_random(1, 1) det = test_matrix.calculate_det() self.assertTrue(test_matrix.data_lines[0][0] == det)