~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

  • Committer: Aaron Bentley
  • Date: 2005-10-19 19:52:11 UTC
  • mfrom: (1185.16.76)
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1474.
  • Revision ID: abentley@panoramicfeedback.com-20051019195211-df4e4a8f8608f8fe
MergeĀ fromĀ mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
        self._enable_file_logging()
182
182
 
183
183
    def _ndiff_strings(self, a, b):
184
 
        """Return ndiff between two strings containing lines."""
 
184
        """Return ndiff between two strings containing lines.
 
185
        
 
186
        A trailing newline is added if missing to make the strings
 
187
        print properly."""
 
188
        if b and b[-1] != '\n':
 
189
            b += '\n'
 
190
        if a and a[-1] != '\n':
 
191
            a += '\n'
185
192
        difflines = difflib.ndiff(a.splitlines(True),
186
193
                                  b.splitlines(True),
187
194
                                  linejunk=lambda x: False,
554
561
                   'bzrlib.selftest.testannotate',
555
562
                   'bzrlib.selftest.testrevprops',
556
563
                   'bzrlib.selftest.testoptions',
 
564
                   'bzrlib.selftest.testhttp',
 
565
                   'bzrlib.selftest.testnonascii',
557
566
                   ]
558
567
 
559
568
    for m in (bzrlib.store, bzrlib.inventory, bzrlib.branch,
560
 
              bzrlib.osutils, bzrlib.commands, bzrlib.merge3):
 
569
              bzrlib.osutils, bzrlib.commands, bzrlib.merge3,
 
570
              bzrlib.errors,
 
571
              ):
561
572
        if m not in MODULES_TO_DOCTEST:
562
573
            MODULES_TO_DOCTEST.append(m)
563
574