nose2 / nose2 / sphinxext.py

Diff from to

nose2/sphinxext.py

+from unittest2.events import PluginsLoadedEvent
 from unittest2.util import getObjectFromName
 
 from docutils import nodes
     def run(self):
         plugin_name = self.arguments[0]
         parent, plugin = getObjectFromName(plugin_name)
+        # FIXME this is too naive
         mod_name = plugin_name[0:plugin_name.index(plugin.__name__)-1]
 
         rst = ViewList()
         rst.append('.. automodule :: %s\n' % mod_name, '<autodoc>')
         rst.append('', '<autodoc>')
 
+        # FIXME: monkeypatch/hook in somehow so we can replace
+        # plugin's config/options with recording mocks. This will
+        # have to wait until the new plugin initialization stuff
+        # lands.
+
+        # command-line options
+
+        # config options
+
+        # class __doc__
+        rst.append(' .. autoclass :: %s\n' % plugin_name, '<autodoc>')
+        rst.append('', '<autodoc>')
+
         print rst
 
         # parse rst and generate new nodelist
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.