Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lettuce
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
lettuce
Commits
bba5bc7c
Commit
bba5bc7c
authored
Jan 29, 2012
by
Benoit Bryon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added doctests in documentation guidelines.
parent
f78b058c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
docs/dev/documentation.rst
+39
-0
No files found.
docs/dev/documentation.rst
View file @
bba5bc7c
...
...
@@ -126,6 +126,43 @@ Export documentation to HTML
* HTML documentation is exported to docs/_build/html/.
*************
Use doctests!
*************
This documentation uses the `Sphinx's doctest extension`_.
Write doctests
==============
Here is a RST code sample to write doctests. You can find some doctests in
:doc:`/reference/terrain`.
.. highlight:: rst
::
.. highlight:: python
.. doctest::
>>> print "Hello world!"
Hello world!
See `Sphinx's doctest extension`_ and `Python's doctest`_ documentations for
details.
Run doctests
============
Go to lettuce folder and use the provided Makefile:
.. highlight:: sh
::
make doctests
**********
References
**********
...
...
@@ -134,3 +171,5 @@ References
.. _`Python-sphinx`: http://sphinx.pocoo.org/
.. _`reStructuredText`: http://docutils.sourceforge.net/rst.html
.. _`Sphinx's doctest extension`: http://sphinx.pocoo.org/ext/doctest.html#module-sphinx.ext.doctest
.. _`Python's doctest`: http://docs.python.org/library/doctest.html
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment