Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

arutk
Copy link
Contributor

@arutk arutk commented May 9, 2022

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]

@pep8speaks
Copy link

pep8speaks commented May 9, 2022

Hello @arutk! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 55:1: W293 blank line contains whitespace

Comment last updated at 2022-06-02 08:25:05 UTC

@codecov
Copy link

codecov bot commented May 9, 2022

Codecov Report

Merging #711 (54013a9) into master (fcfdd26) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            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     
Impacted Files Coverage Δ
src/mngt/ocf_mngt_cache.c 81.70% <0.00%> (-0.60%) ⬇️

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]>
jfckm
jfckm previously approved these changes May 31, 2022
rafalste
rafalste previously approved these changes Jun 2, 2022
@arutk arutk dismissed stale reviews from rafalste and jfckm via 54013a9 June 2, 2022 08:25
Comment on lines +47 to +55
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")


Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants