Fix logging usage in hooks pytest_sessionstart/finish#4204
Merged
nicoddemus merged 1 commit intopytest-dev:masterfrom Oct 20, 2018
Merged
Fix logging usage in hooks pytest_sessionstart/finish#4204nicoddemus merged 1 commit intopytest-dev:masterfrom
nicoddemus merged 1 commit intopytest-dev:masterfrom
Conversation
419095c to
db106d6
Compare
Codecov Report
@@ Coverage Diff @@
## master #4204 +/- ##
==========================================
- Coverage 95.81% 95.81% -0.01%
==========================================
Files 109 109
Lines 24257 24285 +28
Branches 2390 2394 +4
==========================================
+ Hits 23242 23268 +26
- Misses 720 721 +1
- Partials 295 296 +1
Continue to review full report at Codecov.
|
nicoddemus
approved these changes
Oct 20, 2018
Member
nicoddemus
left a comment
There was a problem hiding this comment.
Great work @vbarbaresi, thanks!
twmr
added a commit
to twmr/pytest
that referenced
this pull request
Feb 4, 2019
During the review of pytest-dev#4204 it was not noticed that _setup_cli_logging was already called in the collection phase (pytest_collection). Now _setup_cli_Logging is called in two hooks: pytest_collection and pytest_sessionstart. It only makes sense to call _setup_cli_logging once (in the first called hook of the logging plugin).
6 tasks
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.
Fix issue #3340: missing logging on some hooks
Add logging capture for
pytest_sessionstart()andpytest_sessionfinish()I didn't find anywhere this could be documented; these hooks aren't well documented and this just restores a normal behavior.