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

SetupFixture should have an AttributeUsage of Inherited = false #4158

Closed
stevenaw opened this issue Aug 19, 2022 · 2 comments
Closed

SetupFixture should have an AttributeUsage of Inherited = false #4158

stevenaw opened this issue Aug 19, 2022 · 2 comments

Comments

@stevenaw
Copy link
Member

Based on the conversation in #3937, SetupFixture isn't intended to be used in a base class, however there is nothing stopping it from being added to a base class or even an abstract base class. One source of confusion here could be that the attribute is explicitly marked with Inherited = true prop in the AttributeUsage. It might help avoid confusion to make this explicitly false.

@x789
Copy link
Contributor

x789 commented Oct 1, 2022

I can take care of it.

Shall I also make this change in the v3 branch?
Normally, I would say that setting Inherited to false is a breaking change. But if I understood the discussion in #3937 correctly, the attribute does not work with derived classes, therefore it should be okay in this context.

@stevenaw
Copy link
Member Author

Thanks once again for tackling this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants