-
-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #502 from gdesmar/docstring_bytes
Fix for print_docstring()'s `docstring.find(quote)` Type error
- Loading branch information
Showing
6 changed files
with
95 additions
and
65 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"""Module docstring""" | ||
class A: | ||
b"""Got \xe7\xfe Bytes?""" | ||
assert __doc__ == b"""Got \xe7\xfe Bytes?""" | ||
|
||
def class_func(self): | ||
b"""Got \xe7\xfe Bytes?""" | ||
assert __doc__ == """Module docstring""" | ||
|
||
class B: | ||
"""Got no Bytes?""" | ||
assert __doc__ == """Got no Bytes?""" | ||
|
||
def class_func(self): | ||
"""Got no Bytes?""" | ||
assert __doc__ == """Module docstring""" | ||
|
||
def single_func(): | ||
"""single docstring?""" | ||
assert __doc__ == """Module docstring""" | ||
|
||
def single_byte_func(): | ||
b"""Got \xe7\xfe Bytes?""" | ||
assert __doc__ == """Module docstring""" | ||
|
||
assert __doc__ == """Module docstring""" | ||
|
||
assert single_func.__doc__ == """single docstring?""" | ||
single_func() | ||
|
||
assert single_byte_func.__doc__ == b"""Got \xe7\xfe Bytes?""" | ||
single_byte_func() | ||
|
||
assert A.__doc__ == b"""Got \xe7\xfe Bytes?""" | ||
assert A.class_func.__doc__ == b"""Got \xe7\xfe Bytes?""" | ||
a = A() | ||
assert a.class_func.__doc__ == b"""Got \xe7\xfe Bytes?""" | ||
a.class_func() | ||
|
||
assert B.__doc__ == """Got no Bytes?""" | ||
assert B.class_func.__doc__ == """Got no Bytes?""" | ||
b = B() | ||
assert b.class_func.__doc__ == """Got no Bytes?""" | ||
b.class_func() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"""Module docstring""" | ||
class A: | ||
b"""Got \xe7\xfe Bytes?""" | ||
assert __doc__ == """Module docstring""" | ||
|
||
def class_func(self): | ||
b"""Got \xe7\xfe Bytes?""" | ||
assert __doc__ == """Module docstring""" | ||
|
||
class B: | ||
"""Got no Bytes?""" | ||
assert __doc__ == """Got no Bytes?""" | ||
|
||
def class_func(self): | ||
"""Got no Bytes?""" | ||
assert __doc__ == """Module docstring""" | ||
|
||
def single_func(): | ||
"""single docstring?""" | ||
assert __doc__ == """Module docstring""" | ||
|
||
def single_byte_func(): | ||
b"""Got \xe7\xfe Bytes?""" | ||
assert __doc__ == """Module docstring""" | ||
|
||
assert __doc__ == """Module docstring""" | ||
|
||
assert single_func.__doc__ == """single docstring?""" | ||
single_func() | ||
|
||
assert single_byte_func.__doc__ is None | ||
single_byte_func() | ||
|
||
assert A.__doc__ is None | ||
assert A.class_func.__doc__ is None | ||
a = A() | ||
assert a.class_func.__doc__ is None | ||
a.class_func() | ||
|
||
assert B.__doc__ == """Got no Bytes?""" | ||
assert B.class_func.__doc__ == """Got no Bytes?""" | ||
b = B() | ||
assert b.class_func.__doc__ == """Got no Bytes?""" | ||
b.class_func() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters