[MERGE] Support old API properly

Robert Collins robertc at robertcollins.net
Thu Aug 17 02:00:58 BST 2006

On Wed, 2006-08-16 at 17:15 -0400, Aaron Bentley wrote:
> Hash: SHA1
> John Arbash Meinel wrote:
> > When testing deprecated APIs, the way I test them is to have them not
> > directly import warnings.warn or symbol_versioning.warn. Instead to
> > import symbol_versioning.
> > 
> > After that, there is the helper function:
> > symbol_versioning.set_warning_method()
> > 
> > This lets you override the default warning method with a collector. And
> > then you have the opportunity to both assert that the deprecation is
> > being emitted *and* that it does the right thing.
> Thanks for the tip.  I didn't realize we had that.
> I believe this method is generally useful, so I have automated it as
> assertDeprecated (similar to assertRaises).

Could you please add two tests to tests/test_selftest.py testing
assertDeprecated finds deprecations and does not find not deprecated

with that, +1.

GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060817/3630bf7e/attachment.pgp 

More information about the bazaar mailing list