-
Notifications
You must be signed in to change notification settings - Fork 82
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
pyocf: disable test debug logs by default #711
base: master
Are you sure you want to change the base?
Conversation
Hello @arutk! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2022-06-02 08:25:05 UTC |
Codecov Report
@@ Coverage Diff @@
## master #711 +/- ##
==========================================
- Coverage 69.04% 69.00% -0.04%
==========================================
Files 90 90
Lines 10066 10105 +39
==========================================
+ Hits 6950 6973 +23
- Misses 3116 3132 +16
|
New commandline switch --debug-log and associated debug_log fixture is added to enable debug logs on demand. Signed-off-by: Adam Rutkowski <[email protected]>
def pytest_addoption(parser): | ||
parser.addoption("--debug-log", action="store_true", help="enable debug logs") | ||
|
||
|
||
@pytest.fixture | ||
def debug_log(request): | ||
return request.config.getoption("--debug-log") | ||
|
||
|
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.
Pytest already has it's own log level setting. Any chance to use it instead of introducing additional adoption?
New commandline switch --debug-log and associated debug_log fixture
is added to enable debug logs on demand.
Signed-off-by: Adam Rutkowski [email protected]