-
Notifications
You must be signed in to change notification settings - Fork 161
Disable the log handlers for the stdout and output file. #598
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
Conversation
…le_output_file_handler()
FYI, since we can now mark draft requests for private and public PRs due to our upgrade to the enterprise account, we can now stop using |
@akaszynski Ok, I was tagging with both "draft" and "WIP". I will just use the the draft feature from now on. |
_unittest/test_14_AedtLogger.py
Outdated
def test_04_disable_output_file_handler(self): | ||
content = None | ||
temp_dir = tempfile.gettempdir() | ||
path = os.path.join(temp_dir, "test04.txt") |
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.
where is this file removed?
have you considered NamedTemporaryFile ?
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 have to use gettempdir
because otherwise with NamedTemporaryFile
, I cannot read the file latter on because it is deleted as soon as I closed it.
The temp dir and all its content will be deleted at the end of the test to be sure that no handlers is preventing from this operation. Thanks for the reminder.
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.
LGTM
Disable the log handlers for the stdout and output file.
Add some unit tests to make sure the different log handlers are disable/re-enable properly.
Fix #587.