Skip to content

Commit

Permalink
Merge branch 'connection-426' of github.com:googleapis/python-storage…
Browse files Browse the repository at this point in the history
… into connection-426
  • Loading branch information
cojenco committed May 19, 2021
2 parents 1416ce7 + bcfe2be commit 581fdce
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tests/unit/test_retry.py
Expand Up @@ -65,16 +65,13 @@ def test_miss_w_stdlib_error(self):
exc = ValueError("testing")
self.assertFalse(self._call_fut(exc))

@unittest.skipUnless(
"ConnectionError" in __builtins__.__dict__,
"No builtin 'ConnectionError' in Python 2",
)
def test_w_stdlib_connection_error(self):
from google.cloud.storage import retry

try:
exc = ConnectionError()
self.assertTrue(self._call_fut(exc))
self.assertTrue(ConnectionError in retry._RETRYABLE_TYPES)
except NameError:
pass

exc = ConnectionError()
self.assertTrue(self._call_fut(exc))

class TestConditionalRetryPolicy(unittest.TestCase):
def _make_one(self, retry_policy, conditional_predicate, required_kwargs):
Expand Down

0 comments on commit 581fdce

Please sign in to comment.