~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-12-07 15:15:58 UTC
  • mfrom: (4870.1.1 integration2)
  • Revision ID: pqm@pqm.ubuntu.com-20091207151558-0f1ws7jungrooq89
(doxxx) Update version test

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
 
 
18
17
"""Tests for versioning of bzrlib."""
19
18
 
 
19
from cStringIO import StringIO
 
20
import os
 
21
import re
 
22
 
20
23
from bzrlib import version, workingtree
21
24
from bzrlib.tests import TestCase, TestSkipped
22
25
 
35
38
        else:
36
39
            # ensure that what we got was in fact a working tree instance.
37
40
            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))