~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_version.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-05 10:27:33 UTC
  • mto: (5008.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5009.
  • Revision ID: v.ladeuil+lp@free.fr-20100205102733-8wpjnqz6g4nvrbfu
All Conflict action method names start with 'action_' to avoid potential namespace collisions

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))