def test_eval_query_engine_tool_with_eval_failing(self) -> None:
        """Test eval query engine tool with evaluation failing."""
        evaluation_feedback = "The context does not provide a relevant answer."
        self.mock_evaluator.aevaluate.return_value = EvaluationResult(
            passing=False, feedback=evaluation_feedback
        )
        self.expected_tool_output.content = (
            "Could not use tool nice_tool because it failed evaluation.\n"
            f"Reason: {evaluation_feedback}"
        )

        tool_output = self.eval_query_engine_tool(self.tool_input)
        self.assertEqual(self.expected_tool_output, tool_output)
Test eval query engine tool with evaluation failing.
llama-index-core/tests/tools/test_eval_query_engine_tool.py