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

[WIP] raise exception when fixture is applied to marked function #4122

Closed
wants to merge 1 commit into from

Conversation

avirlrma
Copy link
Contributor

@avirlrma avirlrma commented Oct 12, 2018

sorry I the original PR got closed as I removed the commit from the master.

Ed: closes #3664, once finished.

@nicoddemus
Copy link
Member

No problem!

@nicoddemus nicoddemus changed the title raises exception when fixture is applied to marked function [WIP] raise exception when fixture is applied to marked function Oct 12, 2018
@nicoddemus
Copy link
Member

(I've added "WIP" to the title to make it explicit that this is not ready for review/merge)

@avirlrma
Copy link
Contributor Author

oh makes sense! thanks.
I will keep it in mind from the next time.

@@ -956,6 +956,8 @@ def pytest_fixture_setup(fixturedef, request):
kwargs[argname] = result

fixturefunc = resolve_fixture_function(fixturedef, request)
if hasattr(fixturefunc,'pytestmark'):
Copy link
Member

Choose a reason for hiding this comment

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

to avoid exceptions being eaten on python2, its critical to use getattr(fixturefunc,'pytestmark', False) instead

to be documentative perhaps getattr(fixturefunc,'pytestmark', None) is not None even

@nicoddemus
Copy link
Member

Hi @avirlrma,

It has been a long time since it has last seen activity, plus we have made sweeping changes on master to drop Python 2.7 and 3.4 support, so this PR has some conflicts which require attention.

In order to clear up our queue and let us focus on the active PRs, I'm closing this PR for now.

Please don't consider this a rejection of your PR, we just want to get this out of sight until you have the time to tackle this again. If you get around to work on this in the future, please don't hesitate in re-opening this!

Thanks for your work, the team definitely appreciates it!

@nicoddemus nicoddemus closed this Jun 6, 2019
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.

3 participants