Skip to content

unittest.mock.patch decorator doesn't work with async functions #81177

Closed
@tirkarthi

Description

@tirkarthi
BPO 36996
Nosy @cjw296, @voidspace, @asvetlov, @1st1, @lisroach, @miss-islington, @tirkarthi
PRs
  • bpo-36996: Handle async functions when mock.patch is used as a decorator #13562
  • 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 2019-05-28.07:10:01.250>
    created_at = <Date 2019-05-21.15:22:08.571>
    labels = ['3.8', 'type-bug', 'library', 'expert-asyncio']
    title = "unittest.mock.patch decorator doesn't work with async functions"
    updated_at = <Date 2019-05-28.07:10:01.250>
    user = 'https://github.com/tirkarthi'

    bugs.python.org fields:

    activity = <Date 2019-05-28.07:10:01.250>
    actor = 'asvetlov'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-05-28.07:10:01.250>
    closer = 'asvetlov'
    components = ['Library (Lib)', 'asyncio']
    creation = <Date 2019-05-21.15:22:08.571>
    creator = 'xtreak'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36996
    keywords = ['patch']
    message_count = 6.0
    messages = ['343067', '343084', '343086', '343087', '343088', '343738']
    nosy_count = 7.0
    nosy_names = ['cjw296', 'michael.foord', 'asvetlov', 'yselivanov', 'lisroach', 'miss-islington', 'xtreak']
    pr_nums = ['13562']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue36996'
    versions = ['Python 3.8']

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of lifestdlibPython modules in the Lib dirtopic-asynciotype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions