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

pytest.mark.fun(SomeClass) returns SomeClass with the mark applied instead of a marker #2540

Closed
RonnyPfannschmidt opened this issue Jun 30, 2017 · 3 comments
Labels
topic: marks related to marks, either the general marks or builtin type: backward compatibility might present some backward compatibility issues which should be carefully noted in the changelog type: bug problem that needs to be addressed type: enhancement new feature or API change, should be merged into features branch type: feature-branch new feature or API change, should be merged into features branch

Comments

@RonnyPfannschmidt
Copy link
Member

RonnyPfannschmidt commented Jun 30, 2017

due to the dual api nature of marks, even for non-test-classes its necessary to use pytest.mark.foo()(SomeClass) instead of just the mark

and due to python, that means it cant actually be used as decorator anymore due to double call

@RonnyPfannschmidt RonnyPfannschmidt added type: backward compatibility might present some backward compatibility issues which should be carefully noted in the changelog type: bug problem that needs to be addressed topic: marks related to marks, either the general marks or builtin labels Jun 30, 2017
@RonnyPfannschmidt
Copy link
Member Author

my bad, actually the double one doesn't work as well

@RonnyPfannschmidt RonnyPfannschmidt added the type: feature-branch new feature or API change, should be merged into features branch label Jun 30, 2017
@RonnyPfannschmidt
Copy link
Member Author

for fixing - the marker testing needs to check for test functions/classes instead of functions/classes

this may be a breaking change

@nicoddemus oppinions?

RonnyPfannschmidt added a commit to RonnyPfannschmidt/pytest that referenced this issue Jul 21, 2017
RonnyPfannschmidt added a commit to RonnyPfannschmidt/pytest that referenced this issue Jul 21, 2017
RonnyPfannschmidt added a commit to RonnyPfannschmidt/pytest that referenced this issue Jul 21, 2017
RonnyPfannschmidt added a commit to RonnyPfannschmidt/pytest that referenced this issue Jul 21, 2017
nicoddemus added a commit that referenced this issue Jul 21, 2017
@RonnyPfannschmidt
Copy link
Member Author

fixed in #2604

@nicoddemus nicoddemus added type: enhancement new feature or API change, should be merged into features branch and removed type: enhancement new feature or API change, should be merged into features branch labels Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: marks related to marks, either the general marks or builtin type: backward compatibility might present some backward compatibility issues which should be carefully noted in the changelog type: bug problem that needs to be addressed type: enhancement new feature or API change, should be merged into features branch type: feature-branch new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

2 participants