~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/TestUtil.py

  • Committer: Andrew Bennetts
  • Date: 2010-11-22 03:35:24 UTC
  • mto: This revision was merged to the branch mainline in revision 5547.
  • Revision ID: andrew.bennetts@canonical.com-20101122033524-ouxj0onm3gtkimx3
Remove RepositoryFormatCHK1 and RepositoryFormatCHK2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2011 Canonical Ltd
 
1
# Copyright (C) 2005-2010 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
 
 
33
32
    def __init__(self):
34
33
        logging.Handler.__init__(self)
35
34
        self.records=[]
36
 
 
37
35
    def emit(self, record):
38
36
        self.records.append(record.getMessage())
39
37
 
62
60
                visitor.visitSuite(test)
63
61
                visitTests(test, visitor)
64
62
            else:
65
 
                print "unvisitable non-unittest.TestCase element %r (%r)" % (
66
 
                    test, test.__class__)
 
63
                print "unvisitable non-unittest.TestCase element %r (%r)" % (test, test.__class__)
67
64
 
68
65
 
69
66
class TestSuite(unittest.TestSuite):
186
183
 
187
184
class TestVisitor(object):
188
185
    """A visitor for Tests"""
189
 
 
190
186
    def visitSuite(self, aTestSuite):
191
187
        pass
192
 
 
193
188
    def visitCase(self, aTestCase):
194
189
        pass