@@ -110,10 +110,10 @@ def test__is_file_or_bytes(self) -> None:
110110 def test__retry_with_exp_backoff (self ) -> None :
111111 attempt_counter = 0
112112
113- class RetryableException (Exception ):
113+ class RetryableError (Exception ):
114114 pass
115115
116- class BailException (Exception ):
116+ class BailError (Exception ):
117117 pass
118118
119119 def returns_on_fifth_attempt (bail : Callable , attempt : int ) -> Any :
@@ -122,15 +122,15 @@ def returns_on_fifth_attempt(bail: Callable, attempt: int) -> Any:
122122
123123 if attempt == 5 :
124124 return 'SUCCESS'
125- raise RetryableException ()
125+ raise RetryableError ()
126126
127127 def bails_on_third_attempt (bail : Callable , attempt : int ) -> Any :
128128 nonlocal attempt_counter
129129 attempt_counter += 1
130130
131131 if attempt == 3 :
132- bail (BailException ())
133- raise RetryableException ()
132+ bail (BailError ())
133+ raise RetryableError ()
134134
135135 # Returns the correct result after the correct time (should take 100 + 200 + 400 + 800 = 1500 ms)
136136 start = time .time ()
@@ -143,13 +143,13 @@ def bails_on_third_attempt(bail: Callable, attempt: int) -> Any:
143143
144144 # Stops retrying when failed for max_retries times
145145 attempt_counter = 0
146- with self .assertRaises (RetryableException ):
146+ with self .assertRaises (RetryableError ):
147147 _retry_with_exp_backoff (returns_on_fifth_attempt , max_retries = 3 , backoff_base_millis = 1 )
148148 self .assertEqual (attempt_counter , 4 )
149149
150150 # Bails when the bail function is called
151151 attempt_counter = 0
152- with self .assertRaises (BailException ):
152+ with self .assertRaises (BailError ):
153153 _retry_with_exp_backoff (bails_on_third_attempt , backoff_base_millis = 1 )
154154 self .assertEqual (attempt_counter , 3 )
155155
0 commit comments