~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_doc_generate.py

  • Committer: Martin Pool
  • Date: 2006-03-16 14:55:45 UTC
  • mto: (1615.1.1 bzr.mbp.integration)
  • mto: This revision was merged to the branch mainline in revision 1613.
  • Revision ID: mbp@sourcefrog.net-20060316145545-124f96fa0c9e9461
Stop selftest failing when run outside of bzr source directory

It was trying to import tools.doc_generate, which is used to generate the man
page but is not installed by setup.py.  Skip the test if it can't be run.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
from bzrlib.tests import TestCaseInTempDir
 
17
from bzrlib.tests import TestCaseInTempDir, TestSkipped
18
18
from bzrlib.branch import Branch
19
 
import tools.doc_generate
20
19
 
 
20
# TODO: perhaps doc_generate should be moved into bzrlib instead?
21
21
 
22
22
class TestDocGenerate(TestCaseInTempDir):
23
23
 
24
24
    def test_generate_manpage(self):
25
25
        """Simple smoke test for doc_generate"""
 
26
        try:
 
27
            import tools.doc_generate
 
28
        except ImportError, e:
 
29
            raise TestSkipped("can't load doc_generate: %s" % e)
26
30
        infogen_mod = tools.doc_generate.get_module("man")
27
 
 
28