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

Feature/raises clearer guidance #7499

Merged
merged 2 commits into from Jul 15, 2020

Conversation

Lewiscowles1986
Copy link
Contributor

@Lewiscowles1986 Lewiscowles1986 commented Jul 14, 2020

  • Include documentation when adding new features.
  • Include new tests or update existing tests when applicable.
  • Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.

Fixes #7489

  • Create a new changelog file in the changelog folder, with a name like <ISSUE NUMBER>.<TYPE>.rst. (pending)
  • Add yourself to AUTHORS in alphabetical order. (pending)

I need to work out the did you mean part. I see an example, but it seems to use mark. I did make my own version of the assertion, which fulfilled enough of a change to make me happy outside of pytest using __tracebackhide__ = True with a patched contextlib to avoid the class.

Is some of the boilerplate for legacy python versions?

@Lewiscowles1986 Lewiscowles1986 force-pushed the feature/raises-clearer-guidance branch from 063beec to ab13c8b Compare July 14, 2020 19:21
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @Lewiscowles1986!

I did not follow the discussion originally, but I think this is an improvement.

Please see my comments and let us know what you think.

changelog/7489.improvement.rst Outdated Show resolved Hide resolved
src/_pytest/_code/code.py Outdated Show resolved Hide resolved
@Lewiscowles1986 Lewiscowles1986 force-pushed the feature/raises-clearer-guidance branch from ab13c8b to 90afa50 Compare July 14, 2020 22:15
@Lewiscowles1986 Lewiscowles1986 marked this pull request as ready for review July 14, 2020 22:31
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Thanks @Lewiscowles1986, LGTM, but @asottile @RonnyPfannschmidt and @bluetech should also chime in. 👍

src/_pytest/_code/code.py Outdated Show resolved Hide resolved
Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

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

src/_pytest/_code/code.py Outdated Show resolved Hide resolved
changelog/7489.improvement.rst Outdated Show resolved Hide resolved
Thanks @bluetech

Co-authored-by: Ran Benita <ran@unusedvar.com>
@bluetech bluetech merged commit 71ab623 into pytest-dev:master Jul 15, 2020
@bluetech
Copy link
Member

Thanks @Lewiscowles1986!

blueyed pushed a commit to blueyed/pytest that referenced this pull request Jul 15, 2020
@Lewiscowles1986
Copy link
Contributor Author

Thanks @bluetech @asottile @nicoddemus

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.

suggestion: improve raises confusing message when matching
4 participants