/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_setup.py

  • Committer: Michael Ellerman
  • Date: 2006-03-08 05:59:36 UTC
  • mto: (1610.1.8 bzr.mbp.integration)
  • mto: This revision was merged to the branch mainline in revision 1616.
  • Revision ID: michael@ellerman.id.au-20060308055936-2fc80d3331e44e34
Define __str__ for BranchFormat, just return the format string with the
trailing newline stripped. Override __str__ for BranchFormat4 because
it doesn't have a format string. This fixes ugliness in the UI where
people print branch._format, bzr check for one. Fixes bug #33453.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
""" test for setup.py build process """
 
2
 
 
3
import os
 
4
import sys
 
5
import subprocess
 
6
import shutil
 
7
 
 
8
from bzrlib.tests import TestCase
 
9
 
 
10
 
 
11
class TestSetup(TestCase):
 
12
 
 
13
    def setUp(self):
 
14
        pass
 
15
 
 
16
    def test_build(self):
 
17
        """ test cmd `python setup.py build` """
 
18
        # run setup.py build as subproces and catch return code
 
19
        p = subprocess.Popen([sys.executable, 'setup.py', 'build'],
 
20
                stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 
21
        s = p.communicate()
 
22
        self.assertEqual(0, p.returncode, '`python setup.py build` fails')
 
23
 
 
24
    def tearDown(self):
 
25
        """ cleanup build directory """
 
26
        shutil.rmtree(u'build')