def test_not_square_matrix(self): not_square_matrix = BisymmetricMatrix() not_square_matrix.init_matrix([[1, 2], [3]]) self.assertFalse(not_square_matrix.is_symmetric())
def test_correct_symmetric_matrix(self): symmetric_matrix = BisymmetricMatrix() symmetric_matrix.init_matrix([[1, 2, 3], [2, 4, 5], [3, 5, 6]]) self.assertTrue(symmetric_matrix.is_symmetric())
def test_generate_bisymmetric_is_symmetric(self): correct_bisymmetric_matrix = BisymmetricMatrix() correct_bisymmetric_matrix.generate_bisymmetric_matrix_by_vector([1]) self.assertTrue(correct_bisymmetric_matrix.is_symmetric())
def test_0_size_matrix(self): empty_matrix = BisymmetricMatrix() empty_matrix.init_matrix([]) self.assertTrue(empty_matrix.is_symmetric())
def test_generate_bisymmetric_is_symmetric(self): correct_bisymmetric_matrix = BisymmetricMatrix() correct_bisymmetric_matrix.generate_random_bisymmetric_matrix(3) self.assertTrue(correct_bisymmetric_matrix.is_symmetric())