/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/TestUtil.py

  • Committer: Andrew Bennetts
  • Date: 2011-02-07 04:14:29 UTC
  • mfrom: (5535.4.26 fetch-all-tags-309682)
  • mto: This revision was merged to the branch mainline in revision 5648.
  • Revision ID: andrew.bennetts@canonical.com-20110207041429-3kc1blj34rvvxod9
Merge fetch-all-tags-309682.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#       Author: Robert Collins <robert.collins@canonical.com>
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
29
29
 
30
30
 
31
31
class LogCollector(logging.Handler):
 
32
 
32
33
    def __init__(self):
33
34
        logging.Handler.__init__(self)
34
35
        self.records=[]
 
36
 
35
37
    def emit(self, record):
36
38
        self.records.append(record.getMessage())
37
39
 
60
62
                visitor.visitSuite(test)
61
63
                visitTests(test, visitor)
62
64
            else:
63
 
                print "unvisitable non-unittest.TestCase element %r (%r)" % (test, test.__class__)
 
65
                print "unvisitable non-unittest.TestCase element %r (%r)" % (
 
66
                    test, test.__class__)
64
67
 
65
68
 
66
69
class TestSuite(unittest.TestSuite):
183
186
 
184
187
class TestVisitor(object):
185
188
    """A visitor for Tests"""
 
189
 
186
190
    def visitSuite(self, aTestSuite):
187
191
        pass
 
192
 
188
193
    def visitCase(self, aTestCase):
189
194
        pass