~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/developers/testing.txt

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-10 01:30:32 UTC
  • mfrom: (4873.2.4 2.1.0b4-win32-test-imports)
  • Revision ID: pqm@pqm.ubuntu.com-20091210013032-30uu9d8xyqf13514
(jam) Some docs about the new ModuleAvailableFeature.

Show diffs side-by-side

added added

removed removed

Lines of Context:
353
353
        KnownFailure should be used with care as we don't want a
354
354
        proliferation of quietly broken tests.
355
355
 
 
356
ModuleAvailableFeature
 
357
        A helper for handling running tests based on whether a python
 
358
        module is available. This can handle 3rd-party dependencies (is
 
359
        ``paramiko`` available?) as well as stdlib (``termios``) or
 
360
        extension modules (``bzrlib._groupcompress_pyx``). You create a
 
361
        new feature instance with::
 
362
 
 
363
            MyModuleFeature = ModuleAvailableFeature('bzrlib.something')
 
364
 
 
365
            ...
 
366
            def test_something(self):
 
367
                self.requireFeature(MyModuleFeature)
 
368
                something = MyModuleFeature.module
 
369
 
 
370
 
356
371
We plan to support three modes for running the test suite to control the
357
372
interpretation of these results.  Strict mode is for use in situations
358
373
like merges to the mainline and releases where we want to make sure that