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

Check that the global settings for asyncio are not changed by tests #77743

Closed
brettcannon opened this issue May 17, 2018 · 2 comments
Closed
Labels
3.8 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@brettcannon
Copy link
Member

BPO 33562
Nosy @brettcannon, @vstinner, @giampaolo, @asvetlov, @1st1
PRs
  • bpo-33562: Check for asyncio global setting changes in tests #6958
  • bpo-33562: Check the global asyncio event loop policy isn't set after any tests #7328
  • 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-06-02.03:34:28.438>
    created_at = <Date 2018-05-17.20:49:30.022>
    labels = ['3.8', 'type-bug', 'tests']
    title = 'Check that the global settings for asyncio are not changed by tests'
    updated_at = <Date 2018-06-02.03:34:28.437>
    user = 'https://github.com/brettcannon'

    bugs.python.org fields:

    activity = <Date 2018-06-02.03:34:28.437>
    actor = 'brett.cannon'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-06-02.03:34:28.438>
    closer = 'brett.cannon'
    components = ['Tests']
    creation = <Date 2018-05-17.20:49:30.022>
    creator = 'brett.cannon'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33562
    keywords = ['patch']
    message_count = 2.0
    messages = ['316985', '318485']
    nosy_count = 5.0
    nosy_names = ['brett.cannon', 'vstinner', 'giampaolo.rodola', 'asvetlov', 'yselivanov']
    pr_nums = ['6958', '7328']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue33562'
    versions = ['Python 3.8']

    @brettcannon
    Copy link
    Member Author

    There were not checks in test.libregrtest.save_env to make sure tests were not mucking with the default event loop. The settings to check seem to be:

    'asyncio.get_event_loop_policy', 'asyncio.get_event_loop',
    'asyncio_get_exception_handler', 'asyncio_get_debug',
    'asyncio_get_child_watcher',

    I have a PR that I'm working on that checks these things and it looks like the following tests are being a little sloppy:

    test_asyncgen
    test_contextlib_async
    test_coroutines
    test_socket
    test_sys_settrace

    And test_asyncio never seems to complete.

    @brettcannon brettcannon added 3.8 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels May 17, 2018
    @brettcannon
    Copy link
    Member Author

    New changeset 8425de4 by Brett Cannon in branch 'master':
    bpo-33562: Check the global asyncio event loop policy isn't set after any tests (GH-7328)
    8425de4

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

    No branches or pull requests

    1 participant