docstr: When comparison raises AttributeError, return False.
  This can happen when executor config contains kubernetes objects pickled
  under older kubernetes library version.
docstr_tok: ["When","comparison","raises","AttributeError",",","return","False",".","This","can","happen","when","executor","config","contains","kubernetes","objects","pickled","under","older","kubernetes","library","version","."]
code: def test_compare_values(self):
      """
      When comparison raises AttributeError, return False.
      This can happen when executor config contains kubernetes objects pickled
      under older kubernetes library version.
      """
  
      class MockAttrError:
          def __eq__(self, other):
              raise AttributeError("hello")
  
      a = MockAttrError()
      with pytest.raises(AttributeError):
          # just verify for ourselves that comparing directly will throw AttributeError
          assert a == a
  
      instance = ExecutorConfigType()
      assert instance.compare_values(a, a) is False
      assert instance.compare_values("a", "a") is True
  
imports: from __future__ import annotations
  import datetime
  import pickle
  from copy import deepcopy
  from unittest import mock
  from unittest.mock import MagicMock
  import pytest
  from kubernetes.client import models
  from sqlalchemy import text
  from sqlalchemy.exc import StatementError
  from airflow import settings
  from airflow.models.dag import DAG
  from airflow.serialization.enums import DagAttributeTypes, Encoding
  from airflow.serialization.serialized_objects import BaseSerialization
  from airflow.settings import Session
  from airflow.utils.sqlalchemy import ExecutorConfigType, ensure_pod_is_valid_after_unpickling, nowait, prohibit_commit, skip_locked, with_row_locks
  from airflow.utils.state import State
  from airflow.utils.timezone import utcnow
label_desc: Use image node_id 3 for calling the TestExecutorConfigType obj's underlying member method code with example usage: obj.test_compare_values() without return types