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

Gracefully handle eval() failure(s) for marker expressions #7082

Merged
merged 3 commits into from
Apr 13, 2020

Conversation

symonk
Copy link
Member

@symonk symonk commented Apr 13, 2020

Hello pytest devs, great project thanks and I look forward to growing my contributions, tho its quite the code base to understand! from #4583 this provides a nicer error message to the user when invoking eval() for marker expressions does not go quite successfully, raising a USAGE_ERROR rather than the crash/INTERNAL_ERROR at present.

Thank you very much for taking your time to review my PR, look forward to addressing any feedback, have a great day.

  • Allow maintainers to push and squash when merging my commits. Please uncheck this if you prefer to squash the commits yourself.
  • Create a new changelog file in the changelog folder, with a name like `.
  • Add yourself to AUTHORS in alphabetical order.

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Thanks again @symonk! I left a couple of comments.

We have some discussion on a more comprehensive solution to eval issues at issue #6822 if you're interested. This however should not prevent us from making the current situation better.

src/_pytest/mark/legacy.py Outdated Show resolved Hide resolved
testing/test_mark.py Outdated Show resolved Hide resolved
@symonk
Copy link
Member Author

symonk commented Apr 13, 2020

appreciate the feedback, updated and ran tox locally to verify

changelog/4583.bugfix.rst Outdated Show resolved Hide resolved
@symonk symonk requested a review from bluetech April 13, 2020 13:29
Co-Authored-By: Ran Benita <ran@unusedvar.com>
@bluetech bluetech merged commit c08cff3 into pytest-dev:master Apr 13, 2020
@symonk symonk deleted the 4583-better-ux-with-eval-fails branch April 13, 2020 14:04
@bluetech
Copy link
Member

@symonk I would have liked to invite you to join the development team, however I don't seem to have the permissions for that. So I hope someone who does reads this and does so :)

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.

2 participants