~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/TestUtil.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#
14
14
# You should have received a copy of the GNU General Public License
15
15
# along with this program; if not, write to the Free Software
16
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
17
#
18
18
 
19
19
import sys
72
72
        visitor.visitSuite(self)
73
73
        visitTests(self, visitor)
74
74
 
75
 
    def run(self, result):
76
 
        """Run the tests in the suite, discarding references after running."""
77
 
        tests = list(self)
78
 
        tests.reverse()
79
 
        self._tests = []
80
 
        while tests:
81
 
            if result.shouldStop:
82
 
                self._tests = reversed(tests)
83
 
                break
84
 
            tests.pop().run(result)
85
 
        return result
86
 
 
87
75
 
88
76
class TestLoader(unittest.TestLoader):
89
77
    """Custom TestLoader to extend the stock python one."""