Comment #4 on issue 1591 by smichr: More strict doctests
http://code.google.com/p/sympy/issues/detail?id=1591
doctest already has this gem:
>>> import sympy
>>> import doctest
>>> print '\n'.join(
... filter(lambda x:not x.startswith("#"),
... doctest.script_from_examples(
... inspect.getsource(
... sympy.cos)).splitlines()))+'\n'
from sympy import *
x = Symbol('x')
cos(x**2).diff(x)
cos(1).diff(x)
cos(pi)
cos(pi/2)
cos(2*pi/3)
So if, in source, we make a function named "examples" then we could emit
the code in
whatever manner we want (i.e., making imports explicit). I'd be happy to
work on
this. I would need to know:
1) should all "from sympy import *" be changed to the specific imports
necessary?
2) would you like, in the emitted code, to have the samples expected
results shown?
Or perhaps that could be an option.
/c
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---