Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions test_utils/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import time
from functools import wraps

import six

Expand Down Expand Up @@ -94,7 +93,7 @@ def __init__(
self.error_predicate = error_predicate

def __call__(self, to_wrap):
@wraps(to_wrap)
@six.wraps(to_wrap)
def wrapped_function(*args, **kwargs):
tries = 0
while tries < self.max_tries:
Expand Down Expand Up @@ -152,7 +151,7 @@ def __init__(
self.result_predicate = result_predicate

def __call__(self, to_wrap):
@wraps(to_wrap)
@six.wraps(to_wrap)
def wrapped_function(*args, **kwargs):
tries = 0
while tries < self.max_tries:
Expand Down Expand Up @@ -209,7 +208,7 @@ def __init__(
def __call__(self, to_wrap):
instance = to_wrap.__self__ # only instance methods allowed

@wraps(to_wrap)
@six.wraps(to_wrap)
def wrapped_function(*args, **kwargs):
tries = 0
while tries < self.max_tries:
Expand Down