classification
Title: On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.4, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: hynek, pitrou, python-dev, tarek, vajrasky, zach.ware
Priority: normal Keywords: patch

Created on 2013-12-23 14:48 by vajrasky, last changed 2014-07-24 13:53 by zach.ware. This issue is now closed.

Files
File name Uploaded Description Edit
fix_test_shutil_with_admin_on_windows.patch vajrasky, 2013-12-23 14:48 review
Messages (4)
msg206860 - (view) Author: Vajrasky Kok (vajrasky) * Date: 2013-12-23 14:48
Use administrator account and run Lib\test\test_shutil.py! You will get two failing tests.

======================================================================
FAIL: test_move_dangling_symlink (__main__.TestMove)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_shutil.py", line 60, in wrap
    return func(*args, **kwargs)
  File "Lib\test\test_shutil.py", line 1557, in test_move_dangling_symlink
    self.assertEqual(os.path.realpath(src), os.path.realpath(dst_link))
AssertionError: 'C:\\Users\\compaq\\AppData\\Local\\Temp\\tmp9kkaex06\\baz' != '
C:\\Users\\compaq\\AppData\\Local\\Temp\\tmpuuretujv\\quux'
- C:\Users\compaq\AppData\Local\Temp\tmp9kkaex06\baz
?                                       ^^^^  ------
+ C:\Users\compaq\AppData\Local\Temp\tmpuuretujv\quux
?                                       ^^^ ++++++++


======================================================================
FAIL: test_copymode_follow_symlinks (__main__.TestShutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_shutil.py", line 298, in test_copymode_follow_symlinks
    self.assertEqual(os.stat(src).st_mode, os.stat(dst).st_mode)
AssertionError: 33206 != 33060

----------------------------------------------------------------------
Ran 85 tests in 0.872s

FAILED (failures=2, skipped=12)

Attached the patch which contains the explanation as well to fix the tests.
msg206866 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2013-12-23 15:57
See also issues #9949 and #15411.
msg207127 - (view) Author: Roundup Robot (python-dev) Date: 2014-01-01 01:52
New changeset 0f888589dbcd by Antoine Pitrou in branch '3.3':
Issue #20055: Fix test_shutil under Windows with symlink privileges held.
http://hg.python.org/cpython/rev/0f888589dbcd

New changeset 6fd3d473e1c2 by Antoine Pitrou in branch 'default':
Issue #20055: Fix test_shutil under Windows with symlink privileges held.
http://hg.python.org/cpython/rev/6fd3d473e1c2
msg207128 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2014-01-01 01:52
Pushed, thank you!
History
Date User Action Args
2014-07-24 13:53:15zach.waresetmessages: - msg223821
2014-07-24 09:34:38python-devsetmessages: + msg223821
2014-01-01 01:52:31pitrousetstatus: open -> closed
resolution: fixed
messages: + msg207128

stage: patch review -> resolved
2014-01-01 01:52:10python-devsetnosy: + python-dev
messages: + msg207127
2013-12-23 15:57:00zach.waresetnosy: + zach.ware
messages: + msg206866
2013-12-23 14:53:06pitrousetnosy: + tarek, hynek

stage: patch review
2013-12-23 14:48:44vajraskycreate