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

Fix self reference in function scoped fixtures #5768

Merged
merged 3 commits into from
Aug 30, 2019

Conversation

robholt
Copy link
Contributor

@robholt robholt commented Aug 19, 2019

This fixes an old issue #2270 that was closed at the time without a fix. That issue has more info, but basically function scope fixtures in a class (not a test class) are given a reference to the test class, not their own class, as self. This causes problems when that fixture tries to access attributes on its class.

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 a lot @robholt!

I've took the liberty of adding a few comments and improving the changelog a bit. 👍

Also merged with master to fix linting.

@nicoddemus
Copy link
Member

The failure is unrelated (#5795).

Thanks again @robholt!

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.

2 participants