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

On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py #64254

Closed
vajrasky mannequin opened this issue Dec 23, 2013 · 4 comments
Closed
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@vajrasky
Copy link
Mannequin

vajrasky mannequin commented Dec 23, 2013

BPO 20055
Nosy @pitrou, @tarekziade, @hynek, @zware, @vajrasky
Files
  • fix_test_shutil_with_admin_on_windows.patch
  • 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 2014-01-01.01:52:31.960>
    created_at = <Date 2013-12-23.14:48:44.252>
    labels = ['type-bug', 'library']
    title = 'On Windows NT 6 with administrator account, there are two failing tests on test_shutil.py'
    updated_at = <Date 2014-07-24.13:53:15.968>
    user = 'https://github.com/vajrasky'

    bugs.python.org fields:

    activity = <Date 2014-07-24.13:53:15.968>
    actor = 'zach.ware'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-01-01.01:52:31.960>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2013-12-23.14:48:44.252>
    creator = 'vajrasky'
    dependencies = []
    files = ['33257']
    hgrepos = []
    issue_num = 20055
    keywords = ['patch']
    message_count = 4.0
    messages = ['206860', '206866', '207127', '207128']
    nosy_count = 6.0
    nosy_names = ['pitrou', 'tarek', 'python-dev', 'hynek', 'zach.ware', 'vajrasky']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue20055'
    versions = ['Python 3.3', 'Python 3.4']

    @vajrasky
    Copy link
    Mannequin Author

    vajrasky mannequin commented Dec 23, 2013

    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.

    @vajrasky vajrasky mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Dec 23, 2013
    @zware
    Copy link
    Member

    zware commented Dec 23, 2013

    See also issues bpo-9949 and bpo-15411.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jan 1, 2014

    New changeset 0f888589dbcd by Antoine Pitrou in branch '3.3':
    Issue bpo-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 bpo-20055: Fix test_shutil under Windows with symlink privileges held.
    http://hg.python.org/cpython/rev/6fd3d473e1c2

    @pitrou
    Copy link
    Member

    pitrou commented Jan 1, 2014

    Pushed, thank you!

    @pitrou pitrou closed this as completed Jan 1, 2014
    @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 type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants