mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Fixed a small bug. doctest didn't handle unicode docstrings containing
non-ascii characters.
This commit is contained in:
parent
73cc8479f0
commit
7d428788e1
3 changed files with 26 additions and 3 deletions
|
@ -962,7 +962,9 @@ class DocTestFinder:
|
|||
if obj.__doc__ is None:
|
||||
docstring = ''
|
||||
else:
|
||||
docstring = str(obj.__doc__)
|
||||
docstring = obj.__doc__
|
||||
if not isinstance(docstring, basestring):
|
||||
docstring = str(docstring)
|
||||
except (TypeError, AttributeError):
|
||||
docstring = ''
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue