~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_version.py

  • Committer: Gordon Tyler
  • Date: 2009-12-02 16:36:22 UTC
  • mto: (4870.1.1 integration2)
  • mto: This revision was merged to the branch mainline in revision 4871.
  • Revision ID: gordon@doxxx.net-20091202163622-yhqs3n77wln22vrn
Replaced blackbox test for version's python interpreter path with Alexander Belchenko's test in bt.test_version.

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