~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/__init__.py

[merge] robert

Show diffs side-by-side

added added

removed removed

Lines of Context:
212
212
        if not re.search(needle_re, haystack):
213
213
            raise AssertionError('pattern "%s" not found in "%s"'
214
214
                    % (needle_re, haystack))
215
 
        
 
215
 
216
216
    def _enable_file_logging(self):
217
217
        fileno, name = tempfile.mkstemp(suffix='.log', prefix='testbzr')
218
218
 
456
456
        """Fail unless path, which may be abs or relative, exists."""
457
457
        self.failUnless(osutils.lexists(path))
458
458
        
 
459
    def assertFileEqual(self, content, path):
 
460
        """Fail if path does not contain 'content'."""
 
461
        self.failUnless(osutils.lexists(path))
 
462
        self.assertEqualDiff(content, open(path, 'r').read())
 
463
        
459
464
 
460
465
class MetaTestLog(TestCase):
461
466
    def test_logging(self):