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

Start session timeouts send fatal error and stop further executions #162

Merged
merged 8 commits into from
Feb 8, 2016

Conversation

aggFTW
Copy link
Contributor

@aggFTW aggFTW commented Feb 8, 2016

No description provided.

@msftristew
Copy link
Contributor

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 _do_not_call)

@@ -30,6 +30,8 @@ def __init__(self, shell, data=None):
self.url = None
self.connection_string = None

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra line.

@msftristew
Copy link
Contributor

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)

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.

Copy link
Contributor Author

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.

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.

Copy link
Contributor Author

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.

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.

aggFTW added a commit that referenced this pull request Feb 8, 2016
Start session timeouts send fatal error and stop further executions
@aggFTW aggFTW merged commit f715783 into master Feb 8, 2016
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.

None yet

3 participants