Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_shutil fails with symlinks enabled under Windows #58045

Closed
pitrou opened this issue Jan 22, 2012 · 8 comments
Closed

test_shutil fails with symlinks enabled under Windows #58045

pitrou opened this issue Jan 22, 2012 · 8 comments
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@pitrou
Copy link
Member

pitrou commented Jan 22, 2012

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']

    @pitrou
    Copy link
    Member Author

    pitrou commented Jan 22, 2012

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

    @pitrou pitrou added stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Jan 22, 2012
    @pitrou
    Copy link
    Member Author

    pitrou commented Jan 22, 2012

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

    @atsuoishimoto
    Copy link
    Mannequin

    atsuoishimoto mannequin commented Jul 21, 2012

    Error in test_copymode_follow_symlinks is adderessed in bpo-15411.

    @atsuoishimoto
    Copy link
    Mannequin

    atsuoishimoto mannequin commented Jul 23, 2012

    Error in test_move_dangling_symlink is fixed by bpo-9949

    @pitrou
    Copy link
    Member Author

    pitrou commented Aug 4, 2012

    Ping?

    @hynek
    Copy link
    Member

    hynek commented Oct 7, 2012

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

    @BreamoreBoy
    Copy link
    Mannequin

    BreamoreBoy mannequin commented Jul 16, 2014

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

    @berkerpeksag
    Copy link
    Member

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

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants