~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Martin Pool
  • Date: 2006-03-08 01:10:40 UTC
  • mto: This revision was merged to the branch mainline in revision 1611.
  • Revision ID: mbp@sourcefrog.net-20060308011040-356245d526340960
[patch] Add TestCase.assertIsInstance

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
        self.assertEqual(mode, actual_mode,
328
328
            'mode of %r incorrect (%o != %o)' % (path, mode, actual_mode))
329
329
 
 
330
    def assertIsInstance(self, obj, kls):
 
331
        """Fail if obj is not an instance of kls"""
 
332
        if not isinstance(obj, kls):
 
333
            self.fail("%r is not an instance of %s" % (obj, kls))
 
334
 
330
335
    def _startLogFile(self):
331
336
        """Send bzr and test log messages to a temporary file.
332
337