import testing import kemepo; kemepo.set_docstring_formatter('sphinx') import docstring_helpers; docstring_helpers.reload_module(docstring_helpers) from docstring_helpers import * @testing.test def test_sphinx_docstrings(): test_docstring(DocumentedPublisher, # (fold) '''\ Docstring for the DocumentedPublisher class. :events: **on_first_event** Called when the first kind of event happens. **on_second_event** Called when the second kind of event happens. Line wrapping should work and no weird spaces should be inserted. This class tests the standard case where the events that have been registered by this class are added to the docstring.''') test_docstring(DocumentedPublisherWithArguments, # (fold) '''\ Docstring for the DocumentedPublisherWithArguments class. :events: **on_normal_args** : first, second This event takes two normal arguments. **on_default_values** : first, second=None
import testing import kemepo kemepo.set_docstring_formatter('sphinx') import docstring_helpers docstring_helpers.reload_module(docstring_helpers) from docstring_helpers import * @testing.test def test_sphinx_docstrings(): test_docstring( DocumentedPublisher, # (fold) '''\ Docstring for the DocumentedPublisher class. :events: **on_first_event** Called when the first kind of event happens. **on_second_event** Called when the second kind of event happens. Line wrapping should work and no weird spaces should be inserted. This class tests the standard case where the events that have been registered by this class are added to the docstring.''') test_docstring( DocumentedPublisherWithArguments, # (fold) '''\ Docstring for the DocumentedPublisherWithArguments class.
import testing import kemepo; kemepo.set_docstring_formatter('pretty') import docstring_helpers; docstring_helpers.reload_module(docstring_helpers) from docstring_helpers import * @testing.test def test_pretty_docstrings(): test_docstring(DocumentedPublisher, # (fold) '''\ Docstring for the DocumentedPublisher class. Events ------ on_first_event Called when the first kind of event happens. on_second_event Called when the second kind of event happens. Line wrapping should work and no weird spaces should be inserted. This class tests the standard case where the events that have been registered by this class are added to the docstring.''') test_docstring(DocumentedPublisherWithArguments, # (fold) '''\ Docstring for the DocumentedPublisherWithArguments class. Events ------ on_normal_args : first, second This event takes two normal arguments.
# Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('../tests')) import kemepo kemepo.set_docstring_formatter('sphinx') import docstring_helpers # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] autodoc_member_order = 'bysource' # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates']
import testing import kemepo kemepo.set_docstring_formatter('pretty') import docstring_helpers docstring_helpers.reload_module(docstring_helpers) from docstring_helpers import * @testing.test def test_pretty_docstrings(): test_docstring( DocumentedPublisher, # (fold) '''\ Docstring for the DocumentedPublisher class. Events ------ on_first_event Called when the first kind of event happens. on_second_event Called when the second kind of event happens. Line wrapping should work and no weird spaces should be inserted. This class tests the standard case where the events that have been registered by this class are added to the docstring.''') test_docstring( DocumentedPublisherWithArguments, # (fold) '''\ Docstring for the DocumentedPublisherWithArguments class.