~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/TestUtil.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-12-21 11:51:49 UTC
  • mfrom: (5574.4.4 cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20101221115149-y0jab8xbwmo693gs
(vila) test imports cleanup (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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