code: def test_eq(self):
      self.assertEqual(self._empty_mapping(), self._empty_mapping())
      self.assertEqual(
          self._full_mapping({1: 2}), self._full_mapping({1: 2})
      )
  
      class Exc(Exception):
          pass
  
      class BadCmp(object):
          def __eq__(self, other):
              raise Exc()
  
          def __hash__(self):
              return 1
  
      d1 = self._full_mapping({BadCmp(): 1})
      d2 = self._full_mapping({1: 1})
      self.assertRaises(Exc, lambda: BadCmp() == 1)
      self.assertRaises(Exc, lambda: d1 == d2)
  
imports: import unittest
  import collections
  from test.support import Py_C_RECURSION_LIMIT
label_desc: Use image node_id 7 for calling the TestHashMappingProtocol obj's underlying member method code with example usage: obj.test_eq() and returns: int