/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Andrew Bennetts
  • Date: 2008-10-01 06:10:17 UTC
  • mfrom: (3753 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3755.
  • Revision ID: andrew.bennetts@canonical.com-20081001061017-z97p3m0n9qqjzklf
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
877
877
        self.assertEqual(mode, mode_test,
878
878
                         'mode mismatch %o != %o' % (mode, mode_test))
879
879
 
 
880
    def assertEqualStat(self, expected, actual):
 
881
        """assert that expected and actual are the same stat result.
 
882
 
 
883
        :param expected: A stat result.
 
884
        :param actual: A stat result.
 
885
        :raises AssertionError: If the expected and actual stat values differ
 
886
            other than by atime.
 
887
        """
 
888
        self.assertEqual(expected.st_size, actual.st_size)
 
889
        self.assertEqual(expected.st_mtime, actual.st_mtime)
 
890
        self.assertEqual(expected.st_ctime, actual.st_ctime)
 
891
        self.assertEqual(expected.st_dev, actual.st_dev)
 
892
        self.assertEqual(expected.st_ino, actual.st_ino)
 
893
        self.assertEqual(expected.st_mode, actual.st_mode)
 
894
 
880
895
    def assertPositive(self, val):
881
896
        """Assert that val is greater than 0."""
882
897
        self.assertTrue(val > 0, 'expected a positive value, but got %s' % val)
1134
1149
        # warnings.  It's the easiest way to insulate ourselves from -Werror,
1135
1150
        # though.  -- Andrew, 20071062
1136
1151
        wlist = []
1137
 
        def _catcher(message, category, filename, lineno, file=None):
 
1152
        def _catcher(message, category, filename, lineno, file=None, line=None):
1138
1153
            # despite the name, 'message' is normally(?) a Warning subclass
1139
1154
            # instance
1140
1155
            wlist.append(message)