/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/developers/testing.txt

  • Committer: Robert Collins
  • Date: 2010-05-06 07:48:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506074822-0bsgf2j4h8jx0xkk
Added ``bzrlib.tests.matchers`` as a place to put matchers, along with
our first in-tree matcher. See the module docstring for details.
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
The Importance of Testing
7
7
=========================
8
8
 
9
 
Reliability is a critical success factor for any version control system.
 
9
Reliability is a critical success factor for any Version Control System.
10
10
We want Bazaar to be highly reliable across multiple platforms while
11
11
evolving over time to meet the needs of its community.
12
12
 
183
183
 
184
184
.. _testrepository: https://launchpad.net/testrepository
185
185
 
186
 
 
187
 
Babune continuous integration
188
 
-----------------------------
189
 
 
190
 
We have a Hudson continuous-integration system that automatically runs 
191
 
tests across various platforms.  In the future we plan to add more 
192
 
combinations including testing plugins.  See 
193
 
<http://babune.ladeuil.net:24842/>.  (Babune = Bazaar Buildbot Network.)
194
 
 
195
 
 
196
186
Writing Tests
197
187
=============
198
188
 
430
420
  dependencies and only needed for particular cases.  If they're loaded in
431
421
  other cases then bzr may break for people who don't have those modules.
432
422
  
433
 
`test_import_tariff` allows us to check that removal of imports doesn't
 
423
`test_import_tarrif` allows us to check that removal of imports doesn't
434
424
regress.
435
425
 
436
426
This is done by running the command in a subprocess with
782
772
 
783
773
TestCase
784
774
    A base TestCase that extends the Python standard library's
785
 
    TestCase in several ways.  TestCase is build on
786
 
    ``testtools.TestCase``, which gives it support for more assertion
787
 
    methods (e.g.  ``assertContainsRe``), ``addCleanup``, and other
788
 
    features (see its API docs for details).  It also has a ``setUp`` that
789
 
    makes sure that global state like registered hooks and loggers won't
790
 
    interfere with your test.  All tests should use this base class
791
 
    (whether directly or via a subclass).  Note that we are trying not to
792
 
    add more assertions at this point, and instead to build up a library
793
 
    of ``bzrlib.tests.matchers``.
 
775
    TestCase in several ways.  It adds more assertion methods (e.g.
 
776
    ``assertContainsRe``), ``addCleanup``, and other features (see its API
 
777
    docs for details).  It also has a ``setUp`` that makes sure that
 
778
    global state like registered hooks and loggers won't interfere with
 
779
    your test.  All tests should use this base class (whether directly or
 
780
    via a subclass).
794
781
 
795
782
TestCaseWithMemoryTransport
796
783
    Extends TestCase and adds methods like ``get_transport``,