Bump pyright to 1.1.394 (#3283)

This commit is contained in:
Alexander Kukushkin
2025-02-19 17:04:19 +01:00
committed by GitHub
parent 7531d41587
commit cf427e8b0b
8 changed files with 29 additions and 14 deletions
+4 -1
View File
@@ -352,7 +352,10 @@ class TestGenerateConfig(unittest.TestCase):
self.assertIn('Unexpected exception', e.exception.code)
def test_get_address(self):
with patch('socket.getaddrinfo', Mock(side_effect=Exception)), \
with patch('socket.getaddrinfo', Mock(side_effect=[[(2, 1, 6, '', ('127.0.0.1', 0))],
Exception])), \
patch('socket.gethostname', Mock(return_value='foo')), \
patch('logging.warning') as mock_warning:
self.assertEqual(get_address(), ('foo', '127.0.0.1'))
self.assertEqual(get_address(), (NO_VALUE_MSG, NO_VALUE_MSG))
self.assertIn('Failed to obtain address: %r', mock_warning.call_args_list[0][0])