From 004f40ceb8701dc9afb0854fe3cb10d2bd152b08 Mon Sep 17 00:00:00 2001 From: Mateusz Susik Date: Sun, 6 May 2018 14:17:21 +0200 Subject: [PATCH] feat(adapters): print statement removal (#53) * adapters: print statement removal Signed-off-by: Mateusz Susik * test fix - read timeout added Signed-off-by: Mateusz Susik --- googletrans/adapters.py | 1 - tests/test_client.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/googletrans/adapters.py b/googletrans/adapters.py index 6eb21ce..f04dc8e 100644 --- a/googletrans/adapters.py +++ b/googletrans/adapters.py @@ -13,5 +13,4 @@ class TimeoutAdapter(HTTPAdapter): def send(self, *args, **kwargs): kwargs['timeout'] = self.timeout - print(self.timeout) return super(TimeoutAdapter, self).send(*args, **kwargs) diff --git a/tests/test_client.py b/tests/test_client.py index 07ab85f..4e578eb 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -119,7 +119,7 @@ def test_dest_not_in_supported_languages(translator): def test_connection_timeout(): # Requests library specifies two timeouts: connection and read - with raises(ConnectionError): + with raises((ConnectionError, ReadTimeout)): """If a number is passed to timeout parameter, both connection and read timeouts will be set to it. Firstly, the connection timeout will fail.