make a slightly different exception for the expected mode on cygwin (why would they add support for some but not all of the unix mode bits? very odd)
This commit is contained in:
Robey Pointer 2006-05-03 09:35:31 -07:00
parent 2067e9a136
commit aac434e9b0
1 changed files with 6 additions and 0 deletions

View File

@ -293,6 +293,9 @@ class SFTPTest (unittest.TestCase):
if sys.platform == 'win32': if sys.platform == 'win32':
# chmod not really functional on windows # chmod not really functional on windows
expected_mode = 0666 expected_mode = 0666
if sys.platform == 'cygwin':
# even worse.
expected_mode = 0644
self.assertEqual(stat.st_mode & 0777, expected_mode) self.assertEqual(stat.st_mode & 0777, expected_mode)
self.assertEqual(stat.st_size, 1024) self.assertEqual(stat.st_size, 1024)
@ -331,6 +334,9 @@ class SFTPTest (unittest.TestCase):
if sys.platform == 'win32': if sys.platform == 'win32':
# chmod not really functional on windows # chmod not really functional on windows
expected_mode = 0666 expected_mode = 0666
if sys.platform == 'cygwin':
# even worse.
expected_mode = 0644
self.assertEqual(stat.st_mode & 0777, expected_mode) self.assertEqual(stat.st_mode & 0777, expected_mode)
self.assertEqual(stat.st_size, 1024) self.assertEqual(stat.st_size, 1024)