-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e814cf
commit faca353
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
def pytest_addoption(parser): | ||
"""Add custom commands to pytest invocation. | ||
See https://docs.pytest.org/en/8.1.x/reference/reference.html#parser""" | ||
parser.addoption( | ||
"--verbose-logs", | ||
action="store_true", | ||
default=False, | ||
help="show noisy module logs", | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
"""Configure pytest setup.""" | ||
# add noisy logging libraries. | ||
if not config.getoption("--verbose-logs"): | ||
pass | ||
# for example: | ||
# logging.getLogger("botocore").setLevel(logging.ERROR) | ||
# logging.getLogger("boto3").setLevel(logging.ERROR) | ||
# logging.getLogger("urllib3.connectionpool").setLevel(logging.ERROR) |