aboutsummaryrefslogtreecommitdiffstats
path: root/tests/_autospec.py
diff options
context:
space:
mode:
authorGravatar mbaruh <[email protected]>2024-03-17 23:14:26 +0200
committerGravatar mbaruh <[email protected]>2024-03-17 23:14:26 +0200
commitd4d8e6d0af376e32112512a3726df8f1449deb01 (patch)
treee3f4c4f53ca17c6129b586e167dfa83e1c2cf51d /tests/_autospec.py
parentMake the moderator the author of the compban for phishing attempts (diff)
parentMerge pull request #2953 from python-discord/dependabot/pip/pytest-8.1.1 (diff)
Merge branch 'main' into phishing_button
Diffstat (limited to 'tests/_autospec.py')
-rw-r--r--tests/_autospec.py2
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):