~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to HACKING

Move doctest import to increase speed

Show diffs side-by-side

added added

removed removed

Lines of Context:
282
282
    command changes it name or signature. Ideally only the tests for a
283
283
    given command are affected when a given command is changed.
284
284
 
285
 
Doctests
286
 
--------
287
 
 
288
 
We make selective use of doctests__.  In general they should provide 
289
 
*examples* within the API documentation which can incidentally be tested.  We 
290
 
don't try to test every important case using doctests -- regular Python
291
 
tests are generally a better solution.
292
 
 
293
 
Most of these are in ``bzrlib/doc/api``.  More additions are welcome.
294
 
 
295
 
  __ http://docs.python.org/lib/module-doctest.html
296
 
 
297
 
 
298
285
Running tests
299
286
=============
300
287
Currently, bzr selftest is used to invoke tests.
303
290
 
304
291
  ./bzr selftest -v blackbox
305
292
 
306
 
To skip a particular test (or set of tests), you need to use a negative
307
 
match, like so::
308
 
  ./bzr selftest '^(?!.*blackbox)'  
309
 
 
310
293
 
311
294
Errors and exceptions
312
295
=====================
419
402
so, please reply and say so.)
420
403
 
421
404
 
422
 
:: vim: ft=rst tw=74 ai
 
405
:: vim:tw=74:ai