/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/selftest/__init__.py

  • Committer: Martin Pool
  • Date: 2005-09-18 01:17:03 UTC
  • mto: (1185.8.2) (974.1.91)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: mbp@sourcefrog.net-20050918011703-16e927ad3eadcfd0
- remove remaining external executions of bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        return open(self._log_file_name).read()
93
93
 
94
94
 
 
95
    def capture(self, cmd):
 
96
        """Shortcut that splits cmd into words, runs, and returns stdout"""
 
97
        return self.run_bzr_captured(cmd.split())[0]
 
98
 
 
99
 
95
100
    def run_bzr_captured(self, argv, retcode=0):
96
101
        """Invoke bzr and return (result, stdout, stderr).
97
102
 
284
289
        If a single string is based, it is split into words.
285
290
        For commands that are not simple space-separated words, please
286
291
        pass a list instead."""
287
 
        warn('TestBase.runcmd is deprecated')
 
292
        warn('TestBase.runcmd is deprecated', stacklevel=2)
288
293
        cmd = self._formcmd(cmd)
289
294
        self.log('$ ' + ' '.join(cmd))
290
295
        actual_retcode = subprocess.call(cmd, stdout=self._log_file,
295
300
 
296
301
    def backtick(self, cmd, retcode=0):
297
302
        """Run a command and return its output"""
298
 
        warn('TestBase.backtick is deprecated')
 
303
        warn('TestBase.backtick is deprecated', stacklevel=2)
299
304
        cmd = self._formcmd(cmd)
300
305
        child = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=self._log_file)
301
306
        outd, errd = child.communicate()