def test_generate_bisymmetric_is_bisymmetric(self): correct_bisymmetric_matrix = BisymmetricMatrix() correct_bisymmetric_matrix.generate_bisymmetric_matrix_by_vector( [1, 2, 3, 4]) self.assertTrue(correct_bisymmetric_matrix.is_bisymmetric())
def test_generate_bisymmetric_is_bisymmetric(self): correct_bisymmetric_matrix = BisymmetricMatrix() correct_bisymmetric_matrix.generate_random_bisymmetric_matrix(10) self.assertTrue(correct_bisymmetric_matrix.is_bisymmetric())
def test_generate_by_0_size_vector_is_bisymmetric(self): empty_matrix = BisymmetricMatrix() empty_matrix.generate_bisymmetric_matrix_by_vector([]) self.assertTrue(empty_matrix.is_bisymmetric())
def test_not_square(self): not_square_matrix = BisymmetricMatrix() not_square_matrix.init_matrix([[1, 2, 3], [4, 5, 4]]) self.assertFalse(not_square_matrix.is_bisymmetric())
def test_necessary_condition_is_not_met(self): necessary_condition_is_not_met_matrix = BisymmetricMatrix() necessary_condition_is_not_met_matrix.init_matrix([[1, 2], [2, 3]]) self.assertFalse( necessary_condition_is_not_met_matrix.is_bisymmetric())
def test_necessary_condition_for_not_bisymmetric_is_met(self): not_bisymmetric_matrix = BisymmetricMatrix() not_bisymmetric_matrix.init_matrix([[1, 2, 3], [2, 3, 2], [2, 2, 1]]) self.assertFalse(not_bisymmetric_matrix.is_bisymmetric())
def test_correct_bisymmetric(self): correct_bisymmetric_matrix = BisymmetricMatrix() correct_bisymmetric_matrix.init_matrix([[1, 2, 3], [2, 4, 2], [3, 2, 1]]) self.assertTrue(correct_bisymmetric_matrix.is_bisymmetric())
def test_0_size_matrix(self): empty_matrix = BisymmetricMatrix() empty_matrix.init_matrix([]) self.assertTrue(empty_matrix.is_bisymmetric())