selftest.backtick versus selftest.run_bzr

David Clymer david at zettazebra.com
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 blackbox.py using self.apply_redirected()

> 
> Am I missing a flag? Or should self.run_bzr be updated to support the
> "backtick=True" statement like the blackbox.py 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?

-davidc

-- 
gpg-key: http://www.zettazebra.com/files/key.gpg
-------------- 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 : https://lists.ubuntu.com/archives/bazaar/attachments/20050917/71ba6217/attachment.pgp 


More information about the bazaar mailing list