[arvados] updated: 2.6.0-251-g9effb65ce

git repository hosting git at public.arvados.org
Wed Jun 7 14:51:43 UTC 2023


Summary of changes:
 sdk/python/tests/test_api.py | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

       via  9effb65ce83e308edc404d8541066a456c520dce (commit)
      from  d17049c214dda2a37a928b6ac1a4a348c8d3c9e2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 9effb65ce83e308edc404d8541066a456c520dce
Author: Brett Smith <brett.smith at curii.com>
Date:   Wed Jun 7 10:50:58 2023 -0400

    20613: Fix test syntax for older Pythons
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/sdk/python/tests/test_api.py b/sdk/python/tests/test_api.py
index 65d804ebb..8380185bb 100644
--- a/sdk/python/tests/test_api.py
+++ b/sdk/python/tests/test_api.py
@@ -404,11 +404,9 @@ class ArvadosApiTest(run_test_server.TestCaseWithServers):
         mock_logger = mock.Mock(wraps=real_logger)
         mock_logger.hasHandlers.return_value = False
         mock_logger.level = logging.NOTSET
-        with (
-                mock.patch('logging.getLogger', return_value=mock_logger),
-                mock.patch('time.sleep'),
-                self.assertLogs(real_logger, 'INFO') as actual_logs,
-        ):
+        with mock.patch('logging.getLogger', return_value=mock_logger), \
+             mock.patch('time.sleep'), \
+             self.assertLogs(real_logger, 'INFO') as actual_logs:
             try:
                 api_client('v1', 'https://test.invalid/', 'NoToken', num_retries=1)
             except httplib2.error.ServerNotFoundError:
@@ -424,10 +422,8 @@ class ArvadosApiTest(run_test_server.TestCaseWithServers):
         real_logger = logging.getLogger('googleapiclient.http')
         mock_logger = mock.Mock(wraps=real_logger)
         mock_logger.hasHandlers.return_value = True
-        with (
-                mock.patch('logging.getLogger', return_value=mock_logger),
-                mock.patch('time.sleep'),
-        ):
+        with mock.patch('logging.getLogger', return_value=mock_logger), \
+             mock.patch('time.sleep'):
             try:
                 api_client('v1', 'https://test.invalid/', 'NoToken', num_retries=1)
             except httplib2.error.ServerNotFoundError:

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list