~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_version.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-11-17 03:20:35 UTC
  • mfrom: (4792.4.3 456036)
  • Revision ID: pqm@pqm.ubuntu.com-20091117032035-s3sgtlixj1lrminn
(Gordon Tyler) Fix IndexError during 'bzr ignore /' (#456036)

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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
 
17
18
"""Tests for versioning of bzrlib."""
18
19
 
19
 
from cStringIO import StringIO
20
 
import os
21
 
import re
22
 
 
23
20
from bzrlib import version, workingtree
24
21
from bzrlib.tests import TestCase, TestSkipped
25
22
 
38
35
        else:
39
36
            # ensure that what we got was in fact a working tree instance.
40
37
            self.assertIsInstance(src_tree, workingtree.WorkingTree)
41
 
 
42
 
    def test_python_binary_path(self):
43
 
        self.permit_source_tree_branch_repo()
44
 
        sio = StringIO()
45
 
        version.show_version(show_config=False, show_copyright=False,
46
 
            to_file=sio)
47
 
        out = sio.getvalue()
48
 
        m = re.search(r"Python interpreter: (.*) [0-9]", out)
49
 
        self.assertIsNot(m, None)
50
 
        self.failUnlessExists(m.group(1))