Author vajrasky
Recipients loewis, serhiy.storchaka, vajrasky
Date 2013-12-08.15:42:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1386517339.8.0.238094392139.issue19930@psf.upfronthosting.co.za>
In-reply-to
Content
Fails on Windows Vista.

======================================================================
FAIL: test_mode (__main__.MakedirTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_os.py", line 907, in test_mode
    self.assertEqual(stat.S_IMODE(os.stat(parent).st_mode), 0o775)
AssertionError: 511 != 509

----------------------------------------------------------------------
Ran 157 tests in 1.865s

FAILED (failures=1, skipped=61)
Traceback (most recent call last):
  File "Lib\test\test_os.py", line 2511, in <module>
    test_main()
  File "C:\Users\vajrasky\Code\cpython\lib\test\support\__init__.py", line 1831,
 in decorator
    return func(*args)
  File "Lib\test\test_os.py", line 2507, in test_main
    FDInheritanceTests,
  File "C:\Users\vajrasky\Code\cpython\lib\test\support\__init__.py", line 1719,
 in run_unittest
    _run_suite(suite)
  File "C:\Users\vajrasky\Code\cpython\lib\test\support\__init__.py", line 1694,
 in _run_suite
    raise TestFailed(err)
test.support.TestFailed: Traceback (most recent call last):
  File "Lib\test\test_os.py", line 907, in test_mode
    self.assertEqual(stat.S_IMODE(os.stat(parent).st_mode), 0o775)
AssertionError: 511 != 509

The permission of directory on Windows no matter what mode you give or umask you give to support.temp_umask, is always 0o777 (or 511). I think this test does not make sense in Windows.

>>> os.mkdir('cutecat', 0o555)
>>> os.mkdir('cutecat2', 0o777)
>>> os.stat('cutecat')
os.stat_result(st_mode=16895, st_ino=3940649674207852, st_dev=3960548439, st_nli
nk=1, st_uid=0, st_gid=0, st_size=0, st_atime=1386517061, st_mtime=1386517061, s
t_ctime=1386517061)
>>> os.stat('cutecat2')
os.stat_result(st_mode=16895, st_ino=5066549581050708, st_dev=3960548439, st_nli
nk=1, st_uid=0, st_gid=0, st_size=0, st_atime=1386517067, st_mtime=1386517067, s
t_ctime=1386517067)

Either that, or I am missing something.
History
Date User Action Args
2013-12-08 15:42:19vajraskysetrecipients: + vajrasky, loewis, serhiy.storchaka
2013-12-08 15:42:19vajraskysetmessageid: <1386517339.8.0.238094392139.issue19930@psf.upfronthosting.co.za>
2013-12-08 15:42:19vajraskylinkissue19930 messages
2013-12-08 15:42:19vajraskycreate