Conversation
Codecov Report
@@ Coverage Diff @@
## master #2764 +/- ##
=========================================
- Coverage 84.82% 77.3% -7.52%
=========================================
Files 657 23 -634
Lines 37746 780 -36966
Branches 4537 81 -4456
=========================================
- Hits 32019 603 -31416
+ Misses 4395 149 -4246
+ Partials 1332 28 -1304 |
Not sure what you mean, if I try: warning message is actually printed when I do |
|
Right that's why we're using warnings here. I was talking about logging |
|
Can't we use |
|
Not really because the tests themselves likely wouldn't do this kind of logging but rather these warnings would come from elsewhere like utility functions or fixtures. |
masci
left a comment
There was a problem hiding this comment.
I like the current solution better 👍
Motivation
We need a way to output messages even for passing tests, such as when temporary directories could not be cleaned up. However, pytest captures output by default, so logs only get displayed upon failure or when using extra flags. Therefore we use their built-in warnings mechanism to elicit this behavior by default https://docs.pytest.org/en/latest/warnings.html. We also can output condensed messages so these look just as nice in terminal when not running tests.
Additional Notes
This needs to be merged before #2762, which in turn is required for #2760