Skip to content

Making _CallOutcome.result private in 3.0 #1572

@The-Compiler

Description

@The-Compiler

I propose to rename pluggy._CallOutcome.result to _result with pytest 3.0. It seems to be a common mistake to use .result instead of get_result():

If there was an exception in the wrapped hook, the result attribute will not exist at all, which will cause an AttributeError which hides the exception which actually happened.

To avoid that mistake, I think it'd be better to only use the attribute internally and only provide get_result as external API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: backward compatibilitymight present some backward compatibility issues which should be carefully noted in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions