Status: Accepted
Owner: asmeurer
Labels: Type-Defect Priority-Medium Documentation
New issue 1947 by asmeurer: @property methods are not doctested
http://code.google.com/p/sympy/issues/detail?id=1947
If you have something like:
class Whatever(object):
...
@property
def is_something(self):
"""
Returns True if self has the something property.
>>> from sympy import Whatever
>>> Whatever().is_something
True
"""
return True
The doctest will not be tested by bin/doctest. It will, however, be caught
by python -m doctest
file.py.
I am seeing if I can figure out how to fix it without having to resort to
the workaround:
_is_something_doc = """ docstring"""
@property(doc=_is_something_doc)
def is_something(self):
return True
But if anyone has any hints or advice, it would be welcome :).
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.