From 6b59be1c86060a6b6bd8b7025213c83bca71f0a6 Mon Sep 17 00:00:00 2001 From: Daniel Toyama Date: Sun, 30 Nov 2025 19:39:27 -0800 Subject: [PATCH] Adjust some docstrings. These docstrings were not quite acurate, and should be amended. PiperOrigin-RevId: 838557280 --- android_env/components/adb_controller_test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android_env/components/adb_controller_test.py b/android_env/components/adb_controller_test.py index afb1643..e9acc99 100644 --- a/android_env/components/adb_controller_test.py +++ b/android_env/components/adb_controller_test.py @@ -77,6 +77,8 @@ def test_init_server(self, mock_sleep, mock_check_output): def test_init_server_with_adb_server_port_from_os_env( self, mock_sleep, mock_check_output ): + """Us OS env vars if `use_adb_server_port_from_os_env` is True.""" + # Arrange. # Set the ADB server port to 1234 in the OS environment. os.environ['ANDROID_ADB_SERVER_PORT'] = '1234' @@ -169,7 +171,7 @@ def test_restart_server(self, mock_sleep, mock_check_output): @mock.patch.object(subprocess, 'check_output', autospec=True) @mock.patch.object(time, 'sleep', autospec=True) def test_invalid_command(self, mock_sleep, mock_check_output): - """When an adb command fails, we expect the server to be restarted.""" + """Restart the server when given an invalid command.""" # Arrange. restart_sequence = ['fake_output'.encode('utf-8')] * 3 @@ -238,7 +240,7 @@ def test_invalid_command(self, mock_sleep, mock_check_output): @mock.patch.object(subprocess, 'check_output', autospec=True) @mock.patch.object(time, 'sleep', autospec=True) def test_avoid_infinite_recursion(self, mock_sleep, mock_check_output): - """When an adb command fails, we expect the server to be restarted.""" + """Raise an error if the command fails even after restarts.""" del mock_sleep mock_check_output.side_effect = subprocess.CalledProcessError(