[MERGE] Support old API properly
aaron.bentley at utoronto.ca
Wed Aug 16 22:15:17 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
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:
> 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).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 10064 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060816/d319dbbd/attachment.bin
More information about the bazaar