diff options
Diffstat (limited to 'tests/_autospec.py')
-rw-r--r-- | tests/_autospec.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/_autospec.py b/tests/_autospec.py index 6f990a580..a9cd59dc0 100644 --- a/tests/_autospec.py +++ b/tests/_autospec.py @@ -51,7 +51,7 @@ def autospec(target, *attributes: str, pass_mocks: bool = True, **patch_kwargs) # Import the target if it's a string. # This is to support both object and string targets like patch.multiple. - if type(target) is str: + if isinstance(target, str): target = pkgutil.resolve_name(target) def decorator(func): |