~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/blackbox.py

  • Committer: Robert Collins
  • Date: 2005-09-06 11:09:03 UTC
  • mfrom: (1178)
  • mto: (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: robertc@robertcollins.net-20050906110903-b6be7bd6102403cb
really merge mpool

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
"""
28
28
 
29
29
import sys
30
 
from bzrlib.selftest import InTempDir, BzrTestBase
31
 
 
32
 
 
33
 
class ExternalBase(InTempDir):
34
 
 
 
30
 
 
31
from bzrlib.selftest import TestCaseInTempDir, BzrTestBase
 
32
from bzrlib.branch import Branch
 
33
from bzrlib.commands import run_bzr
 
34
 
 
35
 
 
36
class ExternalBase(TestCaseInTempDir):
35
37
    def runbzr(self, args, retcode=0,backtick=False):
36
 
        try:
37
 
            import shutil
38
 
            from subprocess import call
39
 
        except ImportError, e:
40
 
            _need_subprocess()
41
 
            raise
42
 
 
43
38
        if isinstance(args, basestring):
44
39
            args = args.split()
45
40
 
50
45
            return self.runcmd(['python', self.BZRPATH,] + args,
51
46
                           retcode=retcode)
52
47
 
 
48
 
53
49
class TestCommands(ExternalBase):
54
50
 
55
51
    def test_help_commands(self):
60
56
        self.runbzr('commit -h')
61
57
 
62
58
    def test_init_branch(self):
63
 
        import os
64
59
        self.runbzr(['init'])
65
60
 
66
61
    def test_whoami(self):
200
195
    def test_merge(self):
201
196
        from bzrlib.branch import Branch
202
197
        import os
 
198
        
203
199
        os.mkdir('a')
204
200
        os.chdir('a')
205
201
        self.example_branch()