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

Comments

Projects
None yet
2 participants
@RonnyPfannschmidt
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

This comment has been minimized.

Member

RonnyPfannschmidt commented Jun 30, 2017

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

@RonnyPfannschmidt

This comment has been minimized.

Member

RonnyPfannschmidt commented Jun 30, 2017

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

This comment has been minimized.

Member

RonnyPfannschmidt commented Jul 31, 2017

fixed in #2604

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