◐ Shell
clean mode source ↗

Issue 13837: test_shutil fails with symlinks enabled under Windows

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
?                                         ^^^^^^^ ^^