Issue 13837: test_shutil fails with symlinks enabled under Windows - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
process
Status: closed Resolution: duplicate
Dependencies: Superseder: On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py
View: 20055
Assigned To: Nosy List: BreamoreBoy, berker.peksag, hynek, ishimoto, loewis, pitrou, tim.golden, vstinner
Priority: normal Keywords:

Created on 2012-01-22 18:10 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (8)
msg151783 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-01-22 18:10
This happens when symlinks are enabled under Windows. This doesn't affect any buildbots since they don't run the tests as administrator (or they are not recent enough to have symlink support):


======================================================================
FAIL: test_copymode_follow_symlinks (test.test_shutil.TestShutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\t\cpython\lib\test\test_shutil.py", line 193, in test_copymode_follow
_symlinks
    self.assertEqual(os.stat(src).st_mode, os.stat(dst).st_mode)
AssertionError: 33206 != 33060

======================================================================
FAIL: test_move_dangling_symlink (test.test_shutil.TestMove)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\t\cpython\lib\test\test_shutil.py", line 58, in wrap
    return func(*args, **kwargs)
  File "C:\t\cpython\lib\test\test_shutil.py", line 1136, in test_move_dangling_
symlink
    self.assertEqual(os.path.realpath(src), os.path.realpath(dst_link))
AssertionError: 'c:\\users\\antoine\\appdata\\local\\temp\\tmp8bl4eu\\baz' != 'c
:\\users\\antoine\\appdata\\local\\temp\\tmplc6h2h\\quux'
- c:\users\antoine\appdata\local\temp\tmp8bl4eu\baz
?                                        -- ^^ ^^^^
+ c:\users\antoine\appdata\local\temp\tmplc6h2h\quux
?                                         ^^^^^^^ ^^
msg151784 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-01-22 18:10
(tests were added in #12715 and #9993)
msg165997 - (view) Author: Atsuo Ishimoto (ishimoto) * Date: 2012-07-21 08:33
Error in test_copymode_follow_symlinks is adderessed in #15411.
msg166213 - (view) Author: Atsuo Ishimoto (ishimoto) * Date: 2012-07-23 08:13
Error in test_move_dangling_symlink is fixed by #9949
msg167455 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-08-04 22:38
Ping?
msg172292 - (view) Author: Hynek Schlawack (hynek) * (Python committer) Date: 2012-10-07 11:09
Pong? I understand we have to close #15411 & #9949 first? Can't help here out due to lack of Windows.
msg223301 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-16 23:54
I've asked for patch reviews on #9949 and #15411.
msg323462 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2018-08-13 05:26
Issue 20055 was a duplicate of this one. Both tests have been adjusted in https://github.com/python/cpython/commit/3f48ac98c04fc17f12c63dcf593dd0c19379c7df.