1115
1115
:raises AssertionError: If the expected and actual stat values differ
1116
1116
other than by atime.
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')
1125
1136
def assertLength(self, length, obj_with_len):
1126
1137
"""Assert that obj_with_len is of length length."""