old_contents: import difflib
  import pprint
  import unittest
  
  
  # from http://hg.python.org/cpython/file/67ada6ab7fe2/Lib/unittest/util.py
  # for Python 2.6 support
  _MAX_LENGTH = 80
  def safe_repr(obj, short=False):
      try:
          result = repr(obj)
      except Exception:
          result = object.__repr__(obj)
      if not short or len(result) < _MAX_LENGTH:
          return result
      return result[:_MAX_LENGTH] + ' [truncated]...'
  
  
  class BaseTest(unittest.TestCase):
      # from http://hg.python.org/cpython/file/67ada6ab7fe2/Lib/unittest/case.py
      # for Python 2.6 support
  
      def assertIsInstance(self, obj, cls, msg=None):
          """Same as self.assertTrue(isinstance(obj, cls)), with a nicer
          default message."""
          if not isinstance(obj, cls):
              standardMsg = '%s is not an instance of %r' % (safe_repr(obj), cls)
              self.fail(self._formatMessage(msg, standardMsg))
  
      def assertDictEqual(self, d1, d2, msg=None):
          self.assertIsInstance(d1, dict, 'First argument is not a dictionary')
          self.assertIsInstance(d2, dict, 'Second argument is not a dictionary')
  
          if d1 != d2:
              standardMsg = '%s != %s' % (safe_repr(d1, True), safe_repr(d2, True))
              diff = ('\n' + '\n'.join(difflib.ndiff(
                             pprint.pformat(d1).splitlines(),
                             pprint.pformat(d2).splitlines())))
              standardMsg = self._truncateMessage(standardMsg, diff)
              self.fail(self._formatMessage(msg, standardMsg))
  
      def assertIn(self, member, container, msg=None):
          """Just like self.assertTrue(a in b), but with a nicer default message."""
          if member not in container:
              standardMsg = '%s not found in %s' % (safe_repr(member),
                                                    safe_repr(container))
              self.fail(self._formatMessage(msg, standardMsg))
new_contents: import difflib
  import pprint
  import unittest
  
  
  # from http://hg.python.org/cpython/file/67ada6ab7fe2/Lib/unittest/util.py
  # for Python 2.6 support
  _MAX_LENGTH = 80
  def safe_repr(obj, short=False):
      try:
          result = repr(obj)
      except Exception:
          result = object.__repr__(obj)
      if not short or len(result) < _MAX_LENGTH:
          return result
      return result[:_MAX_LENGTH] + ' [truncated]...'
  
  
  class BaseTest(unittest.TestCase):
      # from http://hg.python.org/cpython/file/67ada6ab7fe2/Lib/unittest/case.py
      # for Python 2.6 support
  
      def assertIsInstance(self, obj, cls, msg=None):
          """Same as self.assertTrue(isinstance(obj, cls)), with a nicer
          default message."""
          if not isinstance(obj, cls):
              standardMsg = '%s is not an instance of %r' % (safe_repr(obj), cls)
              self.fail(self._formatMessage(msg, standardMsg))
  
      def assertDictEqual(self, d1, d2, msg=None):
          self.assertIsInstance(d1, dict, 'First argument is not a dictionary')
          self.assertIsInstance(d2, dict, 'Second argument is not a dictionary')
  
          if d1 != d2:
              standardMsg = '%s != %s' % (safe_repr(d1, True), safe_repr(d2, True))
              diff = ('\n' + '\n'.join(difflib.ndiff(
                             pprint.pformat(d1).splitlines(),
                             pprint.pformat(d2).splitlines())))
              standardMsg = self._truncateMessage(standardMsg, diff)
              self.fail(self._formatMessage(msg, standardMsg))
  
      def assertIn(self, member, container, msg=None):
          """Just like self.assertTrue(a in b), but with a nicer default message."""
          if member not in container:
              standardMsg = '%s not found in %s' % (safe_repr(member),
                                                    safe_repr(container))
              self.fail(self._formatMessage(msg, standardMsg))
  
      def assertNotIn(self, member, container, msg=None):
          """Just like self.assertTrue(a not in b), but with a nicer default message."""
          if member in container:
              standardMsg = '%s unexpectedly found in %s' % (safe_repr(member),
                                                          safe_repr(container))
              self.fail(self._formatMessage(msg, standardMsg))
  
subject: fix final 2.6 test issue