Rev 2444: (robertc) Mark bzrlib.tests and bzrlib.tests.TestUtil as providing assertFOO helper functions by adding a __unittest global attribute. (Robert Collins, Andrew Bennetts, Martin Pool, Jonathan Lange) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Apr 23 05:16:33 BST 2007


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

------------------------------------------------------------
revno: 2444
revision-id: pqm at pqm.ubuntu.com-20070423041629-v7moohhajrjbc2xw
parent: pqm at pqm.ubuntu.com-20070423033245-wg3hadlut6sohka2
parent: robertc at robertcollins.net-20070423034148-b4m9c1iwl7528prf
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2007-04-23 05:16:29 +0100
message:
  (robertc) Mark bzrlib.tests and bzrlib.tests.TestUtil as providing assertFOO helper functions by adding a __unittest global attribute. (Robert Collins, Andrew Bennetts, Martin Pool, Jonathan Lange)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/TestUtil.py       TestUtil.py-20050824080200-5f70140a2d938694
  bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
    ------------------------------------------------------------
    revno: 1739.1.8
    merged: robertc at robertcollins.net-20070423034148-b4m9c1iwl7528prf
    parent: robertc at robertcollins.net-20070423025830-2t4rc0lgkysjmigd
    parent: robertc at robertcollins.net-20070330063216-ug57fzsc4xzqi0hu
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: integration
    timestamp: Mon 2007-04-23 13:41:48 +1000
    message:
      Review feedback.
    ------------------------------------------------------------
    revno: 2387.2.1
    merged: robertc at robertcollins.net-20070330063216-ug57fzsc4xzqi0hu
    parent: pqm at pqm.ubuntu.com-20070329191009-2b533e883212576c
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: cleanassertions
    timestamp: Fri 2007-03-30 16:32:16 +1000
    message:
      Mark bzrlib.tests as providing assertFOO helper functions by adding a __unittest global attribute. (Robert Collins, Andrew Bennetts, Martin Pool, Jonathan Lange)
=== modified file 'NEWS'
--- a/NEWS	2007-04-23 02:58:30 +0000
+++ b/NEWS	2007-04-23 03:41:48 +0000
@@ -178,6 +178,9 @@
       access.
       (Robert Collins, Andrew Bennetts)
 
+    * Mark bzrlib.tests and bzrlib.tests.TestUtil as providing assertFOO helper
+      functions by adding a __unittest global attribute. (Robert Collins,
+      Andrew Bennetts, Martin Pool, Jonathan Lange)
 
 bzr 0.15 2007-04-01
 

=== modified file 'bzrlib/tests/TestUtil.py'
--- a/bzrlib/tests/TestUtil.py	2006-10-05 05:37:25 +0000
+++ b/bzrlib/tests/TestUtil.py	2007-04-23 03:41:48 +0000
@@ -20,6 +20,11 @@
 import logging
 import unittest
 
+# Mark this python module as being part of the implementation
+# of unittest: this gives us better tracebacks where the last
+# shown frame is the test code, not our assertXYZ.
+__unittest = 1
+
 
 class LogCollector(logging.Handler):
     def __init__(self):

=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2007-04-20 03:00:57 +0000
+++ b/bzrlib/tests/__init__.py	2007-04-23 03:41:48 +0000
@@ -89,6 +89,11 @@
 from bzrlib.tests.treeshape import build_tree_contents
 from bzrlib.workingtree import WorkingTree, WorkingTreeFormat2
 
+# Mark this python module as being part of the implementation
+# of unittest: this gives us better tracebacks where the last
+# shown frame is the test code, not our assertXYZ.
+__unittest = 1
+
 default_transport = LocalURLServer
 
 MODULES_TO_TEST = []




More information about the bazaar-commits mailing list