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