Skip to content

Commit

Permalink
Fix pytest on py310 rc
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Aug 15, 2021
1 parent 75f483c commit 7275540
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hypothesis-python/src/hypothesis/internal/reflection.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def get_pretty_function_description(f):
# their module as __self__. This might include c-extensions generally?
if not (self is None or inspect.isclass(self) or inspect.ismodule(self)):
return f"{self!r}.{name}"
elif getattr(dict, name, object()) is f:
elif isinstance(name, str) and getattr(dict, name, object()) is f:
# special case for keys/values views in from_type() / ghostwriter output
return f"dict.{name}"
return name
Expand Down

0 comments on commit 7275540

Please sign in to comment.