Commits

Jason Pellerin committed 7eed833

Doc updates

Comments (0)

Files changed (3)

nose/plugins/collect.py

 """
-FIXME!
+This plugin bypasses the actual execution of tests, instead just collecting
+test names. Fixtures are also bypassed, so execution should be very quick.
 
+This plugin is useful in combination with the testid plugin (--with-id). Run
+both together to get an indexed list of all tests that will enable you to run
+individual tests by index number.
 
+This plugin is also useful for counting tests in a test suite, and making
+people watching your demo think all of your tests pass.
 """
 from nose.plugins.base import Plugin
 from nose.case import Test
 
 class TestSuiteFactory:
     """
-    Factory for producing configure test suites.
+    Factory for producing configured test suites.
     """
     def __init__(self, conf):
         self.conf = conf

nose/plugins/testid.py

 
 This plugin also adds a mode where it will direct the test run to record
 failed tests, and on subsequent runs, include only the tests that failed the
-last time. Activate this mode with the --failed switch:
+last time. Activate this mode with the --failed switch::
 
  % nosetests -v --failed
  #1 test.test_a ... ok
  #3 test.test_c ... FAILED
  #4 test.test_d ... ok
  
-And on the 2nd run, only tests #2 and #3 will run:
+And on the 2nd run, only tests #2 and #3 will run::
 
  % nosetests -v --failed
  #2 test.test_b ... ERROR
 Then as you correct errors and tests pass, they'll drop out of subsequent
 runs.
 
+First::
+
  % nosetests -v --failed
  #2 test.test_b ... ok
  #3 test.test_c ... FAILED
 
+Second::
+
  % nosetests -v --failed
  #3 test.test_c ... FAILED
 
 Until finally when all tests pass, the full set will run again on the next
 invocation.
 
+First::
+
  % nosetests -v --failed
  #3 test.test_c ... ok
 
+Second::
+ 
  % nosetests -v --failed
  #1 test.test_a ... ok
  #2 test.test_b ... ok
     Activate to add a test id (like #1) to each test name output. After
     you've run once to generate test ids, you can re-run individual
     tests by activating the plugin and passing the ids (with or
-    without the # prefix) instead of test names.
+    without the # prefix) instead of test names. Activate with --failed
+    to rerun failing tests only.
     """
     name = 'id'
     idfile = None
                           help="Store test ids found in test runs in this "
                           "file. Default is the file .noseids in the "
                           "working directory.")
-        parser.add_option('--failed', '--loop', action='store_true',
+        parser.add_option('--failed', action='store_true',
                           dest='failed', default=False,
                           help="Run the tests that failed in the last "
                           "test run.")
         except IOError:
             log.debug('IO error reading %s', self.idfile)
             return
-            
-        # I don't load any tests myself, only translate names like '#2'
-        # into the associated test addresses
+
         if self.loopOnFailed and self.failed:
             self.collecting = False
             names = self.failed
             self.failed = []
+        # I don't load any tests myself, only translate names like '#2'
+        # into the associated test addresses
         result = (None, map(self.tr, names))
         if not self.collecting:
             # got some ids in names, so make sure that the ids line

scripts/mkdocs.py

 to_write = []
 
 
-def defining_class(cls, attr):
-    from epydoc.objdoc import _lookup_class_field
-    val, container = _lookup_class_field(cls, attr)
-    return container.value()
 
 
 def write(filename, tpl, ctx):
             html.append('<h3>Methods</h3>')
             for method in methods:
                 print "    %s" % method.qualified_name()
-                defined_in = defining_class(real_class, method.name)
+                defined_in = real_class # FIXME
                 if defined_in == real_class:
                     inherited = ''
                     inh_cls = ''
             html.append('<h3>Attributes</h3>')
             for attr in attrs:
                 print "    a %s" % attr.qualified_name()
-                defined_in = defining_class(real_class, attr.name)
+                defined_in = real_class # FIXME 
                 if defined_in == real_class:
                     inherited = ''
                     inh_cls = ''