480
480
print bzrlib.branch._gen_revision_id(time.time())
484
"""Run internal doctest suite"""
483
def cmd_selftest(verbose=False):
484
"""Run internal test suite"""
485
485
## -v, if present, is seen by doctest; the argument is just here
486
486
## so our parser doesn't complain
488
488
## TODO: --verbose option
490
failures, tests = 0, 0
490
import doctest, bzrlib.store
492
import doctest, bzrlib.store, bzrlib.tests
491
493
bzrlib.trace.verbose = False
492
doctest.testmod(bzrlib.store)
493
doctest.testmod(bzrlib.inventory)
494
doctest.testmod(bzrlib.branch)
495
doctest.testmod(bzrlib.osutils)
496
doctest.testmod(bzrlib.tree)
498
# more strenuous tests;
500
doctest.testmod(bzrlib.tests)
503
cmd_selftest = cmd_doctest
495
for m in bzrlib.store, bzrlib.inventory, bzrlib.branch, bzrlib.osutils, \
496
bzrlib.tree, bzrlib.tests:
497
mf, mt = doctest.testmod(m)
500
print '%-40s %3d tests' % (m.__name__, mt),
502
print '%3d FAILED!' % mf
506
print '%-40s %3d tests' % ('total', tests),
508
print '%3d FAILED!' % failures
515
cmd_doctest = cmd_selftest
506
518
######################################################################