Skip to content

Improve error message in getfixturevalue#9990

Merged
Zac-HD merged 1 commit intopytest-dev:mainfrom
petebman:improve_getfixturevalue_error_message
May 28, 2022
Merged

Improve error message in getfixturevalue#9990
Zac-HD merged 1 commit intopytest-dev:mainfrom
petebman:improve_getfixturevalue_error_message

Conversation

@petebman
Copy link
Contributor

  • Improve the error message when we attempt to access a fixture that has been
    torn down.

  • Add an additional sentence to the docstring explaining when it's not a good
    idea to call getfixturevalue.

closes #9984

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch @petebman!

@Zac-HD Zac-HD merged commit 420dc78 into pytest-dev:main May 28, 2022
@petebman petebman deleted the improve_getfixturevalue_error_message branch May 31, 2022 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

request.getfixturevalue crashes in certain cases.

3 participants