Improve pytest.raises 'message' deprecation docs#4678
Merged
Conversation
Based on recent discussions in pytest-dev#3974
nicoddemus
commented
Jan 24, 2019
| .. code-block:: python | ||
|
|
||
| with pytest.raises(TimeoutError, message="Client got unexpected message"): | ||
| wait_for(websocket.recv(), 0.5) |
Member
Author
There was a problem hiding this comment.
Why didn't I use the asyncio example from #3974?
Blacken docs doesn't seem to like it:
hookid: blacken-docs
doc/en/deprecations.rst:37: code block parse error Cannot parse: 2:10: await asyncio.wait_for(websocket.recv(), 0.5)
doc/en/deprecations.rst:45: code block parse error Cannot parse: 2:10: await asyncio.wait_for(websocket.recv(), 0.5)
🤔
Member
There was a problem hiding this comment.
await can't exist outside of an async def -- so black rejects the code snippet
asottile
approved these changes
Jan 26, 2019
Codecov Report
@@ Coverage Diff @@
## master #4678 +/- ##
==========================================
- Coverage 95.71% 95.69% -0.03%
==========================================
Files 113 113
Lines 24902 24902
Branches 2459 2459
==========================================
- Hits 23835 23829 -6
- Misses 755 758 +3
- Partials 312 315 +3
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on recent discussions in #3974