~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/doc/api/__init__.py

merge with bzr.dev revno.1860

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import os
29
29
    
30
30
def test_suite():
31
 
    candidates = os.listdir(os.path.dirname(__file__))
 
31
    dir_ = os.path.dirname(__file__)
 
32
    if os.path.isdir(dir_):
 
33
        candidates = os.listdir(dir_)
 
34
    else:
 
35
        candidates = []
32
36
    scripts = [candidate for candidate in candidates
33
37
               if candidate.endswith('.txt')]
34
38
    return doctest.DocFileSuite(*scripts)