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

Added ability to disable logging; Fixed ResourceWarnings in test_logging.py #2497

Merged
merged 1 commit into from
Oct 10, 2020

Conversation

andy-maier
Copy link
Contributor

@andy-maier andy-maier commented Oct 10, 2020

Note: This PR is on top of PR #2496 - review only the last commit.
Together, these PRs remove all remaining ResourceWarnings during test.
See commit message for details.

@andy-maier andy-maier changed the title Logging: Added ability to disable logging; Fixed ResourceWarnings in test_logging.py Added ability to disable logging; Fixed ResourceWarnings in test_logging.py Oct 10, 2020
@andy-maier andy-maier self-assigned this Oct 10, 2020
@andy-maier andy-maier added this to the 1.2.0 milestone Oct 10, 2020
@andy-maier andy-maier linked an issue Oct 10, 2020 that may be closed by this pull request
@andy-maier andy-maier force-pushed the try/reswarn-logging branch 3 times, most recently from 44c0d00 to fb33122 Compare October 10, 2020 13:53
@coveralls
Copy link

coveralls commented Oct 10, 2020

Coverage Status

Coverage increased (+0.007%) to 90.715% when pulling 6fc4362 on try/reswarn-logging into 0d2e5d8 on master.

…ing.py

Details:

* Added a value 'off' for the log destination in the
  ``pywbem.configure_logging()`` function that disables logging.

* The key point to address the ResourceWarning about unclosed
  log file was to close the log handler when processing the
  new log dest 'off'.

* Adjusted testcases to disable logging at the end using the
  new log dest 'off'.

* Because this PR addresses the last remaining set of ResourceWarnings,
  the makefile was changed to no longer ignore ResourceWarnings.

Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
@andy-maier andy-maier merged commit 37386ec into master Oct 10, 2020
@andy-maier andy-maier deleted the try/reswarn-logging branch October 10, 2020 20:14
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.

ResourceWarnings in py3 during test
3 participants