-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fixed watch_test.py indentation error #2437
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
/assign @roycaihw |
3a819d6
to
c6d53b6
Compare
/close |
@yliaog: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/reopen |
@yliaog: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/close |
@yliaog: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/reopen |
@yliaog: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
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 there is an extra if __name__ == '__main__':
that we should delete
@@ -577,43 +579,43 @@ def test_pod_log_empty_lines(self): | |||
self.api.delete_namespaced_pod.assert_called_once_with(name=pod_name, namespace=self.namespace) | |||
|
|||
if __name__ == '__main__': |
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.
@yliaog I think we should remove this line. The indentation below doesn't have to change. Also note that there is another if __name__ == '__main__':
towards the end of this file-- that's the correct if __name__ == '__main__':
that we should keep. WDYT?
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.
Yes, that's right.
/close |
@yliaog: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/reopen |
@yliaog: Reopened this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
157413b
to
aaf386e
Compare
da5bfcf
to
8f0d1f8
Compare
does not work currently. ./kubernetes/base/watch/watch_test.py:580:2: E999 IndentationError: expected an indented block after 'if' statement on line 579 def test_watch_with_deserialize_param(self): ^ 1 E999 IndentationError: expected an indented block after 'if' statement on line 579 Fixed the ws_client_test.py address already in use error
@@ -69,7 +69,7 @@ def __init__(self, host='127.0.0.1', port=8888): | |||
self.received_connect = False | |||
self._server_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |||
self._server_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |||
self._server_sock.bind((self.host, self.port)) | |||
self._server_sock.bind((self.host, 0)) |
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.
Could you help me understand why we use 0 port here instead?
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.
0 means it asks OS to allocate a free port, it is to fixe the ws_client_test.py address already in use error.
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
/approve
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: roycaihw, yliaog The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixed watch_test.py indentation error
./kubernetes/base/watch/watch_test.py:580:2: E999 IndentationError: expected an indented block after 'if' statement on line 579 def test_watch_with_deserialize_param(self):
^
1 E999 IndentationError: expected an indented block after 'if' statement on line 579
Fixed the ws_client_test.py address already in use error
What type of PR is this?
/kind bug
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: