~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

  • Committer: Robert Collins
  • Date: 2005-10-18 13:11:57 UTC
  • mfrom: (1185.16.72) (0.2.1)
  • Revision ID: robertc@robertcollins.net-20051018131157-76a9970aa78e927e
Merged Martin.

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,
553
560
                   'bzrlib.selftest.testannotate',
554
561
                   'bzrlib.selftest.testrevprops',
555
562
                   'bzrlib.selftest.testoptions',
 
563
                   'bzrlib.selftest.testhttp',
 
564
                   'bzrlib.selftest.testnonascii',
556
565
                   ]
557
566
 
558
567
    for m in (bzrlib.store, bzrlib.inventory, bzrlib.branch,
559
 
              bzrlib.osutils, bzrlib.commands, bzrlib.merge3):
 
568
              bzrlib.osutils, bzrlib.commands, bzrlib.merge3,
 
569
              bzrlib.errors,
 
570
              ):
560
571
        if m not in MODULES_TO_DOCTEST:
561
572
            MODULES_TO_DOCTEST.append(m)
562
573