#7390: Generate a HTML report for SageNB tests
---------------------------+------------------------------------------------
Reporter: mpatel | Owner: boothby
Type: enhancement | Status: needs_review
Priority: minor | Milestone:
Component: notebook | Keywords:
Work_issues: | Author: Mitesh Patel
Reviewer: | Merged:
---------------------------+------------------------------------------------
Comment(by mpatel):
Doctesting ''may'' be straightforward. Given `foo.py`, `sage-doctest`
preparses its triple-quoted blocks and writes them as docstrings of
`example_*` functions in `.doctest_foo.py`. This file calls on itself a
subclass of `doctest.DocTestRunner`. Since Python's
[http://docs.python.org/library/doctest.html doctest] module can also
generate [http://docs.python.org/library/unittest.html unittests], we can
"replace" the end of `.doctest_foo.py` with, e.g.,
{{{
if __name__ == '__main__':
from sagenb.testing.run_tests import run_and_report
import doctest
run_and_report(doctest.DocTestSuite())
sys.exit(0)
}}}
Although the test names `example_*` are not informative, `sage -python
.doctest_foo_mod.py` runs the tests and makes a report!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7390#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" 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/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---