def test_quadratic_two_solutions(self): "test result of quadratic equation with two solutions" results = Circle.solve_quadratic(1, -3, 2) self.assertTrue(len(results) == 2) verify_results = all(res == 1 or res == 2 for res in results) self.assertTrue(verify_results)
def test_quadratic_two_solutions(self): "test result of quadratic equation with two solutions" results = Circle.solve_quadratic(1, -3, 2) self.assertTrue(len(results) == 2) verify_results = all(res == 1 or res == 2 for res in results) self.assertTrue(verify_results)
def test_quadratic_single_solution(self): "test result of quadratic equation with unique solution" result = Circle.solve_quadratic(1, 2, 1) self.assertTrue(len(result) == 1) self.assertTrue(result[0] == -1)
def test_quadratic_no_solutions(self): "test result of unsatisfiable quadratic equation" result = Circle.solve_quadratic(1, 0, 1) self.assertTrue(len(result) == 0)
def test_quadratic_single_solution(self): "test result of quadratic equation with unique solution" result = Circle.solve_quadratic(1, 2, 1) self.assertTrue(len(result) == 1) self.assertTrue(result[0] == -1)
def test_quadratic_no_solutions(self): "test result of unsatisfiable quadratic equation" result = Circle.solve_quadratic(1, 0, 1) self.assertTrue(len(result) == 0)