mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
class_docstrings(): The new-style class tests should use new-style
classes (sheesh!).
This commit is contained in:
parent
59f809d3bc
commit
4fb1fe8bd2
1 changed files with 4 additions and 4 deletions
|
|
@ -98,24 +98,24 @@ def class_docstrings():
|
|||
pass
|
||||
verify(Classic2.__doc__ is None)
|
||||
|
||||
class NewStatic:
|
||||
class NewStatic(object):
|
||||
"Another docstring."
|
||||
__dynamic__ = 0
|
||||
verify(NewStatic.__doc__ == "Another docstring.")
|
||||
verify(NewStatic.__dict__['__doc__'] == "Another docstring.")
|
||||
|
||||
class NewStatic2:
|
||||
class NewStatic2(object):
|
||||
__dynamic__ = 0
|
||||
pass
|
||||
verify(NewStatic2.__doc__ is None)
|
||||
|
||||
class NewDynamic:
|
||||
class NewDynamic(object):
|
||||
"Another docstring."
|
||||
__dynamic__ = 1
|
||||
verify(NewDynamic.__doc__ == "Another docstring.")
|
||||
verify(NewDynamic.__dict__['__doc__'] == "Another docstring.")
|
||||
|
||||
class NewDynamic2:
|
||||
class NewDynamic2(object):
|
||||
__dynamic__ = 1
|
||||
pass
|
||||
verify(NewDynamic2.__doc__ is None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue