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

unittest.mock: Add __round__ to supported magicmock methods #77697

Closed
mjpieters mannequin opened this issue May 15, 2018 · 3 comments
Closed

unittest.mock: Add __round__ to supported magicmock methods #77697

mjpieters mannequin opened this issue May 15, 2018 · 3 comments
Labels
3.8 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@mjpieters
Copy link
Mannequin

mjpieters mannequin commented May 15, 2018

BPO 33516
Nosy @mjpieters, @vstinner, @voidspace, @ambv, @jreese
PRs
  • bpo-33516: Add support for __round__ to MagicMock #6880
  • 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-05-22.20:02:10.686>
    created_at = <Date 2018-05-15.11:48:12.702>
    labels = ['3.8', 'type-feature', 'library']
    title = 'unittest.mock:  Add __round__ to supported magicmock methods'
    updated_at = <Date 2018-05-22.20:02:10.685>
    user = 'https://github.com/mjpieters'

    bugs.python.org fields:

    activity = <Date 2018-05-22.20:02:10.685>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-05-22.20:02:10.686>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2018-05-15.11:48:12.702>
    creator = 'mjpieters'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33516
    keywords = ['patch']
    message_count = 3.0
    messages = ['316641', '317336', '317337']
    nosy_count = 5.0
    nosy_names = ['mjpieters', 'vstinner', 'michael.foord', 'lukasz.langa', 'jreese']
    pr_nums = ['6880']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue33516'
    versions = ['Python 3.8']

    @mjpieters
    Copy link
    Mannequin Author

    mjpieters mannequin commented May 15, 2018

    I notice that __trunc__, __floor__ and __ceil__ are supported methods for MagicMock, but __round__ (in the same grouping of numeric types emulation methods, see https://docs.python.org/3/reference/datamodel.html#object.\_\_round__), is not.

    Please add this to the mapping too.

    @mjpieters mjpieters mannequin added stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels May 15, 2018
    @terryjreedy terryjreedy added the 3.8 (EOL) end of life label May 18, 2018
    @vstinner
    Copy link
    Member

    New changeset 6c4fab0 by Victor Stinner (John Reese) in branch 'master':
    bpo-33516: Add support for __round__ in MagicMock (GH-6880)
    6c4fab0

    @vstinner
    Copy link
    Member

    Thank you Martijn Pieters for the feature request/bug report, and thanks John Reese for the implementation!

    @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 stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants