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:
parent
2067e9a136
commit
aac434e9b0
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue