  
  class DjangoDoctestOutputChecker(doctest.OutputChecker):
      def check_output(self, want, got, optionflags):
          ok = doctest.OutputChecker.check_output(self, want, got, optionflags)
          if not ok and (want.strip().endswith("L") or got.strip().endswith("L")):
              try:
                  return long(want.strip()) == long(got.strip())
              except ValueError:
                  return False
          return ok
  
  class TestRunner:
      def __init__(self, verbosity_level=0, which_tests=None):
          self.verbosity_level = verbosity_level
 
</s> remove import os, sys, time, traceback
 </s> add import os, re, sys, time, traceback
        # Doctest does an exact string comparison of output, which means long
        # integers aren't equal to normal integers ("22L" vs. "22"). The
        # following code normalizes long integers so that they equal normal
        # integers.
        if not ok:
            return normalize_long_ints(want) == normalize_long_ints(got)
  
  class DjangoDoctestOutputChecker(doctest.OutputChecker):
      def check_output(self, want, got, optionflags):
          ok = doctest.OutputChecker.check_output(self, want, got, optionflags)
        # Doctest does an exact string comparison of output, which means long
        # integers aren't equal to normal integers ("22L" vs. "22"). The
        # following code normalizes long integers so that they equal normal
        # integers.
        if not ok:
            return normalize_long_ints(want) == normalize_long_ints(got)
        # Doctest does an exact string comparison of output, which means long
        # integers aren't equal to normal integers ("22L" vs. "22"). The
        # following code normalizes long integers so that they equal normal
        # integers.
        if not ok:
            return normalize_long_ints(want) == normalize_long_ints(got)
        # Doctest does an exact string comparison of output, which means long
        # integers aren't equal to normal integers ("22L" vs. "22"). The
        # following code normalizes long integers so that they equal normal
        # integers.
        if not ok:
            return normalize_long_ints(want) == normalize_long_ints(got)
        # Doctest does an exact string comparison of output, which means long
        # integers aren't equal to normal integers ("22L" vs. "22"). The
        # following code normalizes long integers so that they equal normal
        # integers.
        if not ok:
            return normalize_long_ints(want) == normalize_long_ints(got)
        # Doctest does an exact string comparison of output, which means long
        # integers aren't equal to normal integers ("22L" vs. "22"). The
        # following code normalizes long integers so that they equal normal
        # integers.
        if not ok:
            return normalize_long_ints(want) == normalize_long_ints(got)
          return ok
  
  class TestRunner:
      def __init__(self, verbosity_level=0, which_tests=None):
          self.verbosity_level = verbosity_level
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 Improved doctests to normalize long integers in compared output

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2034 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
tests/runtests.py