~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-01-20 02:01:04 UTC
  • mfrom: (2220.1.14 bzr.ab.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070120020104-a192555a9165b259
mv can also work on just inventory entry (Eichenberg, Kruger)

Show diffs side-by-side

added added

removed removed

Lines of Context:
661
661
                excName = str(excClass)
662
662
            raise self.failureException, "%s not raised" % excName
663
663
 
664
 
    def assertIs(self, left, right):
 
664
    def assertIs(self, left, right, message=None):
665
665
        if not (left is right):
666
 
            raise AssertionError("%r is not %r." % (left, right))
 
666
            if message is not None:
 
667
                raise AssertionError(message)
 
668
            else:
 
669
                raise AssertionError("%r is not %r." % (left, right))
 
670
 
 
671
    def assertIsNot(self, left, right, message=None):
 
672
        if (left is right):
 
673
            if message is not None:
 
674
                raise AssertionError(message)
 
675
            else:
 
676
                raise AssertionError("%r is %r." % (left, right))
667
677
 
668
678
    def assertTransportMode(self, transport, path, mode):
669
679
        """Fail if a path does not have mode mode.
1539
1549
 
1540
1550
    def failUnlessExists(self, path):
1541
1551
        """Fail unless path, which may be abs or relative, exists."""
1542
 
        self.failUnless(osutils.lexists(path))
 
1552
        self.failUnless(osutils.lexists(path),path+" does not exist")
1543
1553
 
1544
1554
    def failIfExists(self, path):
1545
1555
        """Fail if path, which may be abs or relative, exists."""
1546
 
        self.failIf(osutils.lexists(path))
 
1556
        self.failIf(osutils.lexists(path),path+" exists")
1547
1557
 
1548
1558
 
1549
1559
class TestCaseWithTransport(TestCaseInTempDir):