-
Notifications
You must be signed in to change notification settings - Fork 441
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
Start session timeouts send fatal error and stop further executions #162
Conversation
Doesn't have to happen in this PR, but we should really get the ball rolling on removing these "private magics" (the ones that begin with |
@@ -30,6 +30,8 @@ def __init__(self, shell, data=None): | |||
self.url = None | |||
self.connection_string = None | |||
|
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.
Remove extra line.
APPROVED |
@@ -53,19 +54,42 @@ def test_start_session(): | |||
line = "" | |||
assert not magic.session_started | |||
|
|||
magic._do_not_call_start_session(line) | |||
ret = magic._do_not_call_start_session(line) |
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.
Change the variable name to be more meaningful.
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.
Meaningful enough. It's a unit test.
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.
What "ret" stands for? Even if it's a unit test, best practice to have your test code is easy to update.
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.
It's short for whatever is returned. Another very popular option is ret_v
. Usually used in places where it's not really that meaningful, like a unit test.
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.
Usually I prefer to have a meaningful variable name even if it's in unit test, this will help any new person to this code section to get the intent of the test easily.
Start session timeouts send fatal error and stop further executions
No description provided.