Comment #14 on issue 1641 by smichr: doctests require newline only when run  
for single file
http://code.google.com/p/sympy/issues/detail?id=1641

Comment five notes a difference in behavior when running doctest with and  
without and
argument. The reason for this is that when no argument is given that means  
all files
will be tested. In sympy's doctest there are two levels of testing:

1) testing of *.py files with python's doctest which tests source code  
files ( NOT
the doctest.testfile routine)

2) testing of doc/src/*.txt files if no argument was given OR a testing of  
what was
specified with the sympy.docstring() argument. In this case, however,
doctest.testfile is used and this is better at extracting all docstrings  
whether they
occur in function, class, are vectorized, or don't appear in any function  
at all. The
caveat, I believe, here is that a newline is expected after code -- and  
that would
usually be there in a *txt file. In a *.py file, however, it is not  
uncommon to close
a docstring without a newline after the interactive code snippet and this  
generates
an error.

Summary

sympy.doctest(path) =
     test everything on path and if path has files AND test with  
doctest.testfile
     but don't do the *txt files
sympy.doctest() =
     test everything on path and test ONLY doc/src/*txt files (don't test  
*py files)

/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 sympy-issues@googlegroups.com
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to