Rev 5442: (spiv) Mention applyDeprecated in the Testing Guide. (#602996) (John C in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Sep 24 07:59:20 BST 2010


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5442 [merge]
revision-id: pqm at pqm.ubuntu.com-20100924065915-djj64ixcdc33s6f4
parent: pqm at pqm.ubuntu.com-20100924025046-yxy074eq1swbcxs1
parent: jbowtie at amathaine.com-20100923095451-o66z1yufxfb07l0t
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2010-09-24 07:59:15 +0100
message:
  (spiv) Mention applyDeprecated in the Testing Guide. (#602996) (John C
   Barstow)
modified:
  doc/developers/testing.txt     testing.txt-20080812140359-i70zzh6v2z7grqex-1
=== modified file 'doc/developers/testing.txt'
--- a/doc/developers/testing.txt	2010-09-13 04:20:14 +0000
+++ b/doc/developers/testing.txt	2010-09-23 09:54:51 +0000
@@ -711,6 +711,22 @@
         _test_needs_features = [features.apport]
 
 
+Testing deprecated code
+-----------------------
+
+When code is deprecated, it is still supported for some length of time,
+usually until the next major version. The ``applyDeprecated`` helper
+wraps calls to deprecated code to verify that it is correctly issuing the
+deprecation warning, and also prevents the warnings from being printed
+during test runs.
+
+Typically patches that apply the ``@deprecated_function`` decorator should
+update the accompanying tests to use the ``applyDeprecated`` wrapper.
+
+``applyDeprecated`` is defined in ``bzrlib.tests.TestCase``. See the API
+docs for more details.
+
+
 Testing exceptions and errors
 -----------------------------
 




More information about the bazaar-commits mailing list