~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

[merge] jam-integration, get remerge test fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
739
739
            encoding = bzrlib.user_encoding
740
740
        return self.run_bzr(*args, **kwargs)[0].decode(encoding)
741
741
 
 
742
    def run_bzr_error(self, error_regexes, *args, **kwargs):
 
743
        """Run bzr, and check that stderr contains the supplied regexes
 
744
        
 
745
        This defaults to retcode=3, so you must supply retcode=? if you expect
 
746
        a different value.
 
747
        :return: (out, err) The actual output of running the command (in case you
 
748
                 want to do more inspection)
 
749
        """
 
750
        kwargs.setdefault('retcode', 3)
 
751
        out, err = self.run_bzr(*args, **kwargs)
 
752
        for regex in error_regexes:
 
753
            self.assertContainsRe(err, regex)
 
754
        return out, err
 
755
 
742
756
    def run_bzr_subprocess(self, *args, **kwargs):
743
757
        """Run bzr in a subprocess for testing.
744
758