/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: Alexander Belchenko
  • Date: 2008-02-06 13:43:53 UTC
  • mfrom: (3211 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3231.
  • Revision ID: bialix@ukr.net-20080206134353-hmkib323nxgq3tw6
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
import doctest
28
28
import os
29
 
    
 
29
 
 
30
from bzrlib import tests
 
31
 
30
32
def test_suite():
31
33
    dir_ = os.path.dirname(__file__)
32
34
    if os.path.isdir(dir_):
35
37
        candidates = []
36
38
    scripts = [candidate for candidate in candidates
37
39
               if candidate.endswith('.txt')]
38
 
    return doctest.DocFileSuite(*scripts)
 
40
    suite = doctest.DocFileSuite(*scripts)
 
41
    # DocFileCase reduces the test id to the base name of the tested file, we
 
42
    # want the module to appears there.
 
43
    for t in tests.iter_suite_tests(suite):
 
44
        def make_new_test_id():
 
45
            new_id = '%s(%s)' % ( __name__, t)
 
46
            return lambda: new_id
 
47
        t.id = make_new_test_id()
 
48
    return suite