Fixed watch_test.py indentation error#2437
Conversation
|
/assign @roycaihw |
3a819d6 to
c6d53b6
Compare
|
/close |
|
@yliaog: Closed this PR. DetailsIn 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. DetailsIn 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. DetailsIn 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. DetailsIn 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. |
roycaihw
left a comment
There was a problem hiding this comment.
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.
@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?
|
/close |
|
@yliaog: Closed this PR. DetailsIn 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. DetailsIn 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
| 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.
Could you help me understand why we use 0 port here instead?
There was a problem hiding this comment.
0 means it asks OS to allocate a free port, it is to fixe the ws_client_test.py address already in use error.
|
[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 DetailsNeeds 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.: