Skip to content

test_shutil fails with symlinks enabled under Windows #58045

Closed

Description

@pitrou
BPO 13837
Nosy @loewis, @atsuoishimoto, @pitrou, @vstinner, @tjguk, @berkerpeksag, @hynek
Superseder
  • bpo-20055: On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2018-08-13.05:26:52.899>
    created_at = <Date 2012-01-22.18:10:06.764>
    labels = ['tests', 'type-bug', 'library']
    title = 'test_shutil fails with symlinks enabled under Windows'
    updated_at = <Date 2018-08-13.05:26:52.897>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2018-08-13.05:26:52.897>
    actor = 'berker.peksag'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-08-13.05:26:52.899>
    closer = 'berker.peksag'
    components = ['Library (Lib)', 'Tests']
    creation = <Date 2012-01-22.18:10:06.764>
    creator = 'pitrou'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 13837
    keywords = []
    message_count = 8.0
    messages = ['151783', '151784', '165997', '166213', '167455', '172292', '223301', '323462']
    nosy_count = 8.0
    nosy_names = ['loewis', 'ishimoto', 'pitrou', 'vstinner', 'tim.golden', 'BreamoreBoy', 'berker.peksag', 'hynek']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '20055'
    type = 'behavior'
    url = 'https://bugs.python.org/issue13837'
    versions = ['Python 3.3']

    Activity

    1. pitrou commented on Jan 22, 2012

      @pitrou
      MemberAuthor

      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
      ?                                         ^^^^^^^ ^^
    2. added
      stdlib
      tests
      type-bug
      on Jan 22, 2012
    3. pitrou commented on Jan 22, 2012

      @pitrou
      MemberAuthor

      (tests were added in bpo-12715 and bpo-9993)

    4. atsuoishimoto commented on Jul 21, 2012

      atsuoishimotomannequin
      Mannequin

      Error in test_copymode_follow_symlinks is adderessed in bpo-15411.

    5. atsuoishimoto commented on Jul 23, 2012

      atsuoishimotomannequin
      Mannequin

      Error in test_move_dangling_symlink is fixed by bpo-9949

    6. pitrou commented on Aug 4, 2012

      @pitrou
      MemberAuthor

      Ping?

    7. hynek commented on Oct 7, 2012

      @hynek
      Member

      Pong? I understand we have to close bpo-15411 & bpo-9949 first? Can't help here out due to lack of Windows.

    8. BreamoreBoy commented on Jul 16, 2014

      BreamoreBoymannequin
      Mannequin

      I've asked for patch reviews on bpo-9949 and bpo-15411.

    9. berkerpeksag commented on Aug 13, 2018

      @berkerpeksag
      Member

      bpo-20055 was a duplicate of this one. Both tests have been adjusted in 3f48ac9.

    10. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      stdlibteststype-bug

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions