Message205527
Fails on Windows Vista.
...................................................s..s..s..s.......F.
......
======================================================================
FAIL: test_mkdir_parents (__main__.PathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Lib\test\test_pathlib.py", line 1502, in test_mkdir_parents
self.assertEqual(stat.S_IMODE(p.stat().st_mode), 0o555 & mode)
AssertionError: 511 != 365
======================================================================
FAIL: test_mkdir_parents (__main__.WindowsPathTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "Lib\test\test_pathlib.py", line 1502, in test_mkdir_parents
self.assertEqual(stat.S_IMODE(p.stat().st_mode), 0o555 & mode)
AssertionError: 511 != 365
----------------------------------------------------------------------
Ran 326 tests in 3.293s
FAILED (failures=2, skipped=90)
This line is problematic.
self.assertEqual(stat.S_IMODE(p.stat().st_mode), 0o555 & mode)
From http://docs.python.org/2/library/os.html#os.chmod:
Note
Although Windows supports chmod(), you can only set the file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.
In Django, we skip chmod test on Windows.
https://github.com/django/django/blob/master/tests/staticfiles_tests/tests.py#L830
But this line is okay:
self.assertEqual(stat.S_IMODE(p.parent.stat().st_mode), mode)
So we should just skip that particular problematic line on Windows. |
|
Date |
User |
Action |
Args |
2013-12-08 08:39:48 | vajrasky | set | recipients:
+ vajrasky, pitrou, r.david.murray, serhiy.storchaka |
2013-12-08 08:39:48 | vajrasky | set | messageid: <1386491988.07.0.718429989744.issue19921@psf.upfronthosting.co.za> |
2013-12-08 08:39:48 | vajrasky | link | issue19921 messages |
2013-12-08 08:39:47 | vajrasky | create | |
|