class_docstr: Unit test for Smart Data Lake Result Parsing
class_docstr_tok: ["Unit","test","for","Smart","Data","Lake","Result","Parsing"]
code: def test_result_parsing_unsuccessful_with_exceptions(
      self, context, logger
  ):
      # Test Flow : Code Execution Unsuccessful with exceptions
      result_parsing = ResultParsing()
      result_parsing._add_result_to_memory = Mock()
      mock_response_parser = Mock()
  
      def mock_result_parsing(*args, **kwargs):
          raise Exception("Unit test exception")
  
      context._query_exec_tracker = Mock()
      context.query_exec_tracker.execute_func = Mock(
          side_effect=mock_result_parsing
      )
  
      def mock_intermediate_values(key: str):
          if key == "response_parser":
              return mock_response_parser
  
      context.get_intermediate_value = Mock(
          side_effect=mock_intermediate_values
      )
  
      result = None
      try:
          result = result_parsing.execute(
              input="Test Result", context=context, logger=logger
          )
      except Exception:
          assert result is None
      assert isinstance(result_parsing, ResultParsing)
  
file_path: pandas-ai/tests/pipelines/smart_datalake/test_result_parsing.py
imports: from typing import Optional
  from unittest.mock import Mock
  import pandas
  import pytest
  from pandasai.helpers.logger import Logger
  from pandasai.llm.fake import FakeLLM
  from pandasai.pipelines.pipeline_context import PipelineContext
  from pandasai.smart_dataframe import SmartDataframe
  from pandasai.pipelines.smart_datalake_chat.result_parsing import ResultParsing
label_desc: Use image node_id 9 for calling the TestResultParsing obj's underlying member method code with example usage: obj.test_result_parsing_unsuccessful_with_exceptions(context, logger) and returns: mock_response_parser