-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
coverage: add log level config coverage #986
Conversation
@@ -247,3 +247,11 @@ def test_log_config_file(mocked_logging_config_module): | |||
mocked_logging_config_module.fileConfig.assert_called_once_with( | |||
"log_config", disable_existing_loggers=False | |||
) | |||
|
|||
|
|||
@pytest.mark.parametrize("log_level", [5, 10, 20, 30, 40, 50]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pass an int ? I have to say I always used this with a string level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, there's a cast in place... In case is different than str
and int
, you'll have a KeyError
tho.
tests/test_config.py
Outdated
|
||
@pytest.mark.parametrize("log_level", [5, 10, 20, 30, 40, 50]) | ||
def test_config_log_level(log_level): | ||
Config(app=asgi_app, log_level=log_level) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why config is not loaded ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied.
@euri10 Comments applied. Thank you. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a rebase later and we gtg @Kludex , thanks !
@euri10 done. Thank you :) |
* tests: add log level config coverage * apply comments
Covering:
File:
config.py