~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: 2011-04-05 14:47:26 UTC
  • mfrom: (5752.2.11 2.4-windows-lfstat)
  • Revision ID: pqm@pqm.ubuntu.com-20110405144726-zi3lj2kwvjml4kx5
(jameinel) Add osutils.lstat/fstat so that even on Windows lstat(fname) ==
 fstat(open(fname).fileno()) (John A Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1267
1267
                         'st_mtime did not match')
1268
1268
        self.assertEqual(expected.st_ctime, actual.st_ctime,
1269
1269
                         'st_ctime did not match')
1270
 
        if sys.platform != 'win32':
 
1270
        if sys.platform == 'win32':
1271
1271
            # On Win32 both 'dev' and 'ino' cannot be trusted. In python2.4 it
1272
1272
            # is 'dev' that varies, in python 2.5 (6?) it is st_ino that is
1273
 
            # odd. Regardless we shouldn't actually try to assert anything
1274
 
            # about their values
 
1273
            # odd. We just force it to always be 0 to avoid any problems.
 
1274
            self.assertEqual(0, expected.st_dev)
 
1275
            self.assertEqual(0, actual.st_dev)
 
1276
            self.assertEqual(0, expected.st_ino)
 
1277
            self.assertEqual(0, actual.st_ino)
 
1278
        else:
1275
1279
            self.assertEqual(expected.st_dev, actual.st_dev,
1276
1280
                             'st_dev did not match')
1277
1281
            self.assertEqual(expected.st_ino, actual.st_ino,