Skip to content

Commit 6b59be1

Browse files
kenjitoyamacopybara-github
authored andcommitted
Adjust some docstrings.
These docstrings were not quite acurate, and should be amended. PiperOrigin-RevId: 838557280
1 parent c7e2748 commit 6b59be1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

android_env/components/adb_controller_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ def test_init_server(self, mock_sleep, mock_check_output):
7777
def test_init_server_with_adb_server_port_from_os_env(
7878
self, mock_sleep, mock_check_output
7979
):
80+
"""Us OS env vars if `use_adb_server_port_from_os_env` is True."""
81+
8082
# Arrange.
8183
# Set the ADB server port to 1234 in the OS environment.
8284
os.environ['ANDROID_ADB_SERVER_PORT'] = '1234'
@@ -169,7 +171,7 @@ def test_restart_server(self, mock_sleep, mock_check_output):
169171
@mock.patch.object(subprocess, 'check_output', autospec=True)
170172
@mock.patch.object(time, 'sleep', autospec=True)
171173
def test_invalid_command(self, mock_sleep, mock_check_output):
172-
"""When an adb command fails, we expect the server to be restarted."""
174+
"""Restart the server when given an invalid command."""
173175

174176
# Arrange.
175177
restart_sequence = ['fake_output'.encode('utf-8')] * 3
@@ -238,7 +240,7 @@ def test_invalid_command(self, mock_sleep, mock_check_output):
238240
@mock.patch.object(subprocess, 'check_output', autospec=True)
239241
@mock.patch.object(time, 'sleep', autospec=True)
240242
def test_avoid_infinite_recursion(self, mock_sleep, mock_check_output):
241-
"""When an adb command fails, we expect the server to be restarted."""
243+
"""Raise an error if the command fails even after restarts."""
242244

243245
del mock_sleep
244246
mock_check_output.side_effect = subprocess.CalledProcessError(

0 commit comments

Comments
 (0)