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

'xfail' markers without a condition no longer rely on the underlying Item objects deriving from PyobjMixin #2142

Merged

Conversation

barneygale
Copy link
Contributor

_getglobals() assumes that self.item has a obj attribute. This is normally provided by PyobjMixin, but it doesn't seem necessary if there's no condition to evaluate. Therefore this patch calls _getglobals() a little later on when it's actually needed for condition evaluation.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.832% when pulling 99e3a6d on barneygale:xfail_without_condition_getglobals into da40bcf on pytest-dev:master.

@nicoddemus
Copy link
Member

@barneygale thanks for the PR.

linting and docs environments broke because you didn't add a link to your user name to the CHANGELOG. See the others for an example and please make sure to add your user name in alphabetical order.

Also, please rebase on the latest master.

@barneygale barneygale force-pushed the xfail_without_condition_getglobals branch from 99e3a6d to 8db9915 Compare January 2, 2017 22:01
@barneygale
Copy link
Contributor Author

Rebased and (hopefully) fixed the changelog.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.816% when pulling df409a0 on barneygale:xfail_without_condition_getglobals into 78f0388 on pytest-dev:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.816% when pulling df409a0 on barneygale:xfail_without_condition_getglobals into 78f0388 on pytest-dev:master.

@nicoddemus
Copy link
Member

Hmm just realized this: should we add a test for this? Otherwise we risk re-introducing this requirement in the future by mistake.

@barneygale
Copy link
Contributor Author

Yep, I'll look into it

@nicoddemus
Copy link
Member

Thanks! 👍

@nicoddemus nicoddemus merged commit a4d2a57 into pytest-dev:master Feb 3, 2017
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