/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 bzrlib/doc/api/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2008-07-08 14:55:19 UTC
  • mfrom: (3530 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3532.
  • Revision ID: john@arbash-meinel.com-20080708145519-paqg4kjwbpgs2xmq
Merge bzr.dev 3530

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
from bzrlib import tests
31
31
 
32
 
def test_suite():
 
32
def load_tests(basic_tests, module, loader):
 
33
    """This module creates its own test suite with DocFileSuite."""
 
34
 
33
35
    dir_ = os.path.dirname(__file__)
34
36
    if os.path.isdir(dir_):
35
37
        candidates = os.listdir(dir_)
37
39
        candidates = []
38
40
    scripts = [candidate for candidate in candidates
39
41
               if candidate.endswith('.txt')]
 
42
    # since this module doesn't define tests, we ignore basic_tests
40
43
    suite = doctest.DocFileSuite(*scripts)
41
44
    # DocFileCase reduces the test id to the base name of the tested file, we
42
45
    # want the module to appears there.
43
46
    for t in tests.iter_suite_tests(suite):
44
47
        def make_new_test_id():
45
 
            new_id = '%s(%s)' % ( __name__, t)
 
48
            new_id = '%s.DocFileTest(%s)' % ( __name__, t)
46
49
            return lambda: new_id
47
50
        t.id = make_new_test_id()
48
51
    return suite