/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/test_generate_docs.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
and produce non-empty output.
21
21
"""
22
22
 
23
 
from cStringIO import StringIO
24
23
 
25
 
import bzrlib.commands
26
 
from bzrlib.tests import TestCase
 
24
import breezy.commands
 
25
from ..sixish import (
 
26
    BytesIO,
 
27
    )
 
28
from . import TestCase
27
29
 
28
30
 
29
31
class Options:
35
37
 
36
38
    def setUp(self):
37
39
        super(TestGenerateDocs, self).setUp()
38
 
        self.sio = StringIO()
 
40
        self.sio = BytesIO()
39
41
        self.options = Options()
40
 
        self.options.bzr_name = 'bzr'
41
 
        bzrlib.commands.install_bzr_command_hooks()
 
42
        self.options.brz_name = 'brz'
 
43
        breezy.commands.install_bzr_command_hooks()
42
44
 
43
45
    def test_man_page(self):
44
 
        from bzrlib.doc_generate import autodoc_man
 
46
        from breezy.doc_generate import autodoc_man
45
47
 
46
48
        autodoc_man.infogen(self.options, self.sio)
47
49
        self.assertNotEqual('', self.sio.getvalue())
48
50
 
49
51
    def test_rstx_man(self):
50
 
        from bzrlib.doc_generate import autodoc_rstx
 
52
        from breezy.doc_generate import autodoc_rstx
51
53
 
52
54
        autodoc_rstx.infogen(self.options, self.sio)
53
55
        self.assertNotEqual('', self.sio.getvalue())