Rev 5638: Change the stat assertions to be sure that we are catching the callers correctly. in http://bazaar.launchpad.net/~jameinel/bzr/2.3-build-cache-sha-740932
John Arbash Meinel
john at arbash-meinel.com
Mon Apr 4 11:57:46 UTC 2011
At http://bazaar.launchpad.net/~jameinel/bzr/2.3-build-cache-sha-740932
------------------------------------------------------------
revno: 5638
revision-id: john at arbash-meinel.com-20110404115739-w4v1i0t9n2us52f1
parent: john at arbash-meinel.com-20110404112450-7b1sh1f0cbe7sndk
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.3-build-cache-sha-740932
timestamp: Mon 2011-04-04 13:57:39 +0200
message:
Change the stat assertions to be sure that we are catching the callers correctly.
-------------- next part --------------
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2011-04-01 00:21:19 +0000
+++ b/bzrlib/tests/__init__.py 2011-04-04 11:57:39 +0000
@@ -1261,11 +1261,15 @@
'st_mtime did not match')
self.assertEqual(expected.st_ctime, actual.st_ctime,
'st_ctime did not match')
- if sys.platform != 'win32':
+ if sys.platform == 'win32':
# On Win32 both 'dev' and 'ino' cannot be trusted. In python2.4 it
# is 'dev' that varies, in python 2.5 (6?) it is st_ino that is
- # odd. Regardless we shouldn't actually try to assert anything
- # about their values
+ # odd. We just force it to always be 0 to avoid any problems.
+ self.assertEqual(0, expected.st_dev)
+ self.assertEqual(0, actual.st_dev)
+ self.assertEqual(0, expected.st_ino)
+ self.assertEqual(0, actual.st_ino)
+ else:
self.assertEqual(expected.st_dev, actual.st_dev,
'st_dev did not match')
self.assertEqual(expected.st_ino, actual.st_ino,
More information about the bazaar-commits
mailing list