Skip to content

Improve getscopeitem assertion message #2983

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

Merged
merged 1 commit into from
Nov 30, 2017

Conversation

nicoddemus
Copy link
Member

Fix #2979

@@ -553,7 +553,7 @@ def _getscopeitem(self, scope):
if node is None and scope == "class":
# fallback to function item itself
node = self._pyfuncitem
assert node
assert node, 'Could not obtain a node for scope "{}" for function {!r}'.format(self._pyfuncitem)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't there be two args to format()? (scope is missing)

Copy link
Member Author

Choose a reason for hiding this comment

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

Definitely, thanks for catching it! 😉

That's your morning coffee not kicking in yet. 😅

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.697% when pulling 682b94d on nicoddemus:improve-assert-2979 into 88ed1ab on pytest-dev:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.697% when pulling 70f1e3b on nicoddemus:improve-assert-2979 into 88ed1ab on pytest-dev:master.

@RonnyPfannschmidt RonnyPfannschmidt merged commit 4de433e into pytest-dev:master Nov 30, 2017
@nicoddemus nicoddemus deleted the improve-assert-2979 branch November 30, 2017 19:59
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.

4 participants