-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ticket 23 configure bluesky logging #114
Conversation
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.
After these changes, running this test module in one go I get test failures on lines 224
and 212
of assert os.path.exists(qualified_log_filename) == True
AssertionError
. I defined LOG_FILE_NAME = "bluesky.log"
test_bluesky.py
Outdated
@@ -181,6 +187,45 @@ def _plan(): | |||
# Assert we successfully set npoints periods | |||
self.assertEqual(g.get_number_periods(), npoints) | |||
|
|||
def test_GIVEN_logging_is_requested_THEN_the_log_folder_exists(): |
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.
Needs to be def test_GIVEN_logging_is_requested_THEN_the_log_file_exists(self): -> None
. Same for lines 201
and 213
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.
Done.
this_function_name = sys._getframe().f_code.co_name | ||
message = LOG_MESSAGE + this_function_name | ||
logger.blueskylogger.info(message) | ||
qualified_log_filename = os.path.join(log_path, LOG_FILE_NAME) |
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 think LOG_FILE_NAME
needs defining similar to the other environment variables at the top of the file
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.
Added missed constant
@jackbdoughty , I have corrected the issues, including the ruff ones |
Description of work
Some system tests have been added for testing the bluesky logger
Ticket
Link to Ticket
Acceptance criteria
The system tests should run successfully as a complete set or when executed individually
System tests
Added tests to check the following:
Code Review
Final Steps