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

Use support.rmtree in test_zipfile #65639

Closed
tjguk opened this issue May 5, 2014 · 7 comments
Closed

Use support.rmtree in test_zipfile #65639

tjguk opened this issue May 5, 2014 · 7 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@tjguk
Copy link
Member

tjguk commented May 5, 2014

BPO 21440
Nosy @tjguk, @zware
Files
  • issue21440.test_zipfile.patch
  • issue21440.test_tarzipfile.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 = 'https://github.com/tjguk'
    closed_at = <Date 2014-05-06.13:30:15.210>
    created_at = <Date 2014-05-05.17:22:10.308>
    labels = ['type-bug', 'tests']
    title = 'Use support.rmtree in test_zipfile'
    updated_at = <Date 2014-09-03.22:54:01.848>
    user = 'https://github.com/tjguk'

    bugs.python.org fields:

    activity = <Date 2014-09-03.22:54:01.848>
    actor = 'python-dev'
    assignee = 'tim.golden'
    closed = True
    closed_date = <Date 2014-05-06.13:30:15.210>
    closer = 'tim.golden'
    components = ['Tests']
    creation = <Date 2014-05-05.17:22:10.308>
    creator = 'tim.golden'
    dependencies = []
    files = ['35156', '35157']
    hgrepos = []
    issue_num = 21440
    keywords = ['patch']
    message_count = 7.0
    messages = ['217935', '217937', '217938', '217945', '217946', '217977', '226333']
    nosy_count = 3.0
    nosy_names = ['tim.golden', 'python-dev', 'zach.ware']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue21440'
    versions = ['Python 3.5']

    @tjguk
    Copy link
    Member Author

    tjguk commented May 5, 2014

    At present test_zipfile uses shutil.rmtree to remove its test artefacts. This intermittently but frequently fails to remove cleanly on a Windows development box. Changing it to use the test.support helper functions should reduce the incidence.

    @tjguk tjguk self-assigned this May 5, 2014
    @tjguk tjguk added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels May 5, 2014
    @tjguk
    Copy link
    Member Author

    tjguk commented May 5, 2014

    Same goes for test_tarfile (updated patch attached)

    @tjguk
    Copy link
    Member Author

    tjguk commented May 5, 2014

    Adding Zach as another Windows dev

    @zware
    Copy link
    Member

    zware commented May 5, 2014

    I don't see the intermittent failures (this machine may well just be too slow). The patch looks good and doesn't cause failures, though, so +1 from me.

    @tjguk
    Copy link
    Member Author

    tjguk commented May 5, 2014

    Thanks. I get them enough that it stops a test run being particularly
    useful, especially when I've just touched something (eg unlink) which
    might conceivably affect something like tarfile.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 6, 2014

    New changeset 4ebf97299b18 by Tim Golden in branch 'default':
    bpo-21440 Use support.rmtree in test_zipfile & test_tarfile
    http://hg.python.org/cpython/rev/4ebf97299b18

    @tjguk tjguk closed this as completed May 6, 2014
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Sep 3, 2014

    New changeset 706ec07100d6 by Victor Stinner in branch '3.4':
    Issue bpo-21440: Backport changeset 4ebf97299b18 to branch 3.4, use
    http://hg.python.org/cpython/rev/706ec07100d6

    New changeset 6b4d31641109 by Victor Stinner in branch '3.4':
    Issue bpo-21440: test_zipfile: replace last direct calls to os.remove() with
    http://hg.python.org/cpython/rev/6b4d31641109

    New changeset 73ce1afc6ee2 by Victor Stinner in branch 'default':
    (Merge 3.4) Issue bpo-21440: test_zipfile: replace last direct calls to
    http://hg.python.org/cpython/rev/73ce1afc6ee2

    @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
    tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants