selftest.backtick versus selftest.run_bzr

David Clymer david at
Sat Sep 17 18:53:28 BST 2005

On Sat, 2005-09-17 at 12:09 -0400, John A Meinel wrote:
> I'm trying to write some more test cases. These are supposed to be
> external tests (as in making sure that the cmd_* functions are working
> correctly from the outside).
> >From what I can tell, there are 2 convenience functions to consider,
> self.backtick() and self.run_bzr(). run_bzr() actually just invokes the
> in-memory bzr library (which I am okay with), but I can't find a way to
> get the output of the command.

I think there is an example of capturing output from run_bzr in
TestCase.test_add_reports() in using self.apply_redirected()

> Am I missing a flag? Or should self.run_bzr be updated to support the
> "backtick=True" statement like the tests use? Or should I be
> subclassing the blackbox testing class instead of just TestCaseInTempDir?

I would think that if you are looking at the output of the command, this
would be a blackbox test, in which case you probably want to be using
ExternalBase and self.runbzr(). Is there a particular reason not to use
the external testing class?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : 

More information about the bazaar mailing list