Refs #32552 -- Added DiscoverRunner.log() to allow customization.#14150
Refs #32552 -- Added DiscoverRunner.log() to allow customization.#14150felixxm merged 1 commit intodjango:mainfrom
Conversation
|
The tests for DiscoverRunner django/tests/test_runner/test_discover_runner.py Lines 336 to 337 in 3704481 and django/tests/test_runner/test_discover_runner.py Lines 252 to 262 in 3704481 only check for verbosity >= 2. I believe we should add tests for verbosity < 2 as well. Thoughts? |
|
Also, the title of the PR should be something like "Added a DiscoverRunner.log() method" since you're not actually changing |
I would add a single new test called |
4ad06b3 to
330de72
Compare
|
Just made few changes. Let me know if this seems better. Working on the tests! |
cjerdonek
left a comment
There was a problem hiding this comment.
Just made few changes. Let me know if this seems better.
It looks like you didn't finish addressing my previous comments: #14150 (comment)
I've repeated them inline with some additional explanation and added a couple other comments.
330de72 to
8b221a2
Compare
carltongibson
left a comment
There was a problem hiding this comment.
Hi @abbasidaniyal — Thanks for updating this.
- Please look at the existing test failures.
- Also see Chris' comment about adding a new
test_log(), with the appropriate matrix of combinations. (SeesubTestPython docs and examples in the test suite for usage.)
Once those are in place and addition to the DiscoverRunner docs and a release note in releases/4.0.txt would be appropriate.
Just made these changes. Not sure if the docs and the release notes are under the appropriate heading, let me know if I need to make amends. |
737caf9 to
cf9ecc1
Compare
cjerdonek
left a comment
There was a problem hiding this comment.
Okay, last round of comments (I think?). They're more minor than before. Thanks again for keeping at it, @abbasidaniyal.
docs/topics/testing/advanced.txt
Outdated
There was a problem hiding this comment.
Backticks are needed around INFO, 1, DEBUG, and 2.
There was a problem hiding this comment.
Please also add a .. versionadded 4.0 directive. With a shirt note saying this method was added.
There was a problem hiding this comment.
You can remove the empty line above and the two empty lines below.
cf9ecc1 to
a190cc7
Compare
smithdc1
left a comment
There was a problem hiding this comment.
Your prompt for a review made me look at this again. 😄
A few small questions/comments, I suspect most can be ignored.
Thanks Carlton Gibson, Chris Jerdonek, and David Smith for reviews.
|
Thanks y'all 🚀 I rebased and pushed small edits. |
ticket-32552
Add a method
log(self, message, level)to DiscoverRunner class which prints the message by comparing the level with self.verbosity.Replace the use of print with self.log