~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/trace.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-09 17:24:11 UTC
  • mto: (5029.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5030.
  • Revision ID: v.ladeuil+lp@free.fr-20100209172411-crac3tglyj88bbqd
Move TraceServer to bzrlib.tests.test_server

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
and then delegates it.
21
21
"""
22
22
 
23
 
from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
24
 
 
25
 
 
26
 
class TransportTraceDecorator(TransportDecorator):
 
23
from bzrlib.transport import decorator
 
24
 
 
25
 
 
26
class TransportTraceDecorator(decorator.TransportDecorator):
27
27
    """A tracing decorator for Transports.
28
28
 
29
29
    Calls that potentially perform IO are logged to self._activity. The
169
169
        self._activity.append(operation_tuple)
170
170
 
171
171
 
172
 
class TraceServer(DecoratorServer):
173
 
    """Server for the TransportTraceDecorator for testing with."""
174
 
 
175
 
    def get_decorator_class(self):
176
 
        return TransportTraceDecorator
177
 
 
178
 
 
179
172
def get_test_permutations():
180
173
    """Return the permutations to be used in testing."""
181
 
    return [(TransportTraceDecorator, TraceServer)]
 
174
    from bzrlib.tests import test_server
 
175
    return [(TransportTraceDecorator, test_server.TraceServer)]