~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: 2009-11-18 22:03:00 UTC
  • mfrom: (4807.2.6 2.1.0b4-win32-accepted)
  • Revision ID: pqm@pqm.ubuntu.com-20091118220300-jh43xy7xqftziwql
(jam) Last few tweaks to get the win32 test suite to pass.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1115
1115
        :raises AssertionError: If the expected and actual stat values differ
1116
1116
            other than by atime.
1117
1117
        """
1118
 
        self.assertEqual(expected.st_size, actual.st_size)
1119
 
        self.assertEqual(expected.st_mtime, actual.st_mtime)
1120
 
        self.assertEqual(expected.st_ctime, actual.st_ctime)
1121
 
        self.assertEqual(expected.st_dev, actual.st_dev)
1122
 
        self.assertEqual(expected.st_ino, actual.st_ino)
1123
 
        self.assertEqual(expected.st_mode, actual.st_mode)
 
1118
        self.assertEqual(expected.st_size, actual.st_size,
 
1119
                         'st_size did not match')
 
1120
        self.assertEqual(expected.st_mtime, actual.st_mtime,
 
1121
                         'st_mtime did not match')
 
1122
        self.assertEqual(expected.st_ctime, actual.st_ctime,
 
1123
                         'st_ctime did not match')
 
1124
        if sys.platform != 'win32':
 
1125
            # On Win32 both 'dev' and 'ino' cannot be trusted. In python2.4 it
 
1126
            # is 'dev' that varies, in python 2.5 (6?) it is st_ino that is
 
1127
            # odd. Regardless we shouldn't actually try to assert anything
 
1128
            # about their values
 
1129
            self.assertEqual(expected.st_dev, actual.st_dev,
 
1130
                             'st_dev did not match')
 
1131
            self.assertEqual(expected.st_ino, actual.st_ino,
 
1132
                             'st_ino did not match')
 
1133
        self.assertEqual(expected.st_mode, actual.st_mode,
 
1134
                         'st_mode did not match')
1124
1135
 
1125
1136
    def assertLength(self, length, obj_with_len):
1126
1137
        """Assert that obj_with_len is of length length."""