Rev 5027: Move TraceServer to bzrlib.tests.test_server in file:///home/vila/src/bzr/cleanup/test-servers/

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Feb 9 17:24:11 GMT 2010


At file:///home/vila/src/bzr/cleanup/test-servers/

------------------------------------------------------------
revno: 5027
revision-id: v.ladeuil+lp at free.fr-20100209172411-crac3tglyj88bbqd
parent: v.ladeuil+lp at free.fr-20100209172225-21qcajx30gtbd5kx
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-servers
timestamp: Tue 2010-02-09 18:24:11 +0100
message:
  Move TraceServer to bzrlib.tests.test_server
-------------- next part --------------
=== modified file 'bzrlib/tests/test_server.py'
--- a/bzrlib/tests/test_server.py	2010-02-09 17:22:25 +0000
+++ b/bzrlib/tests/test_server.py	2010-02-09 17:24:11 +0000
@@ -172,3 +172,11 @@
         return readonly.ReadonlyTransportDecorator
 
 
+class TraceServer(DecoratorServer):
+    """Server for the TransportTraceDecorator for testing with."""
+
+    def get_decorator_class(self):
+        from bzrlib.transport import trace
+        return TransportTraceDecorator
+
+

=== modified file 'bzrlib/transport/trace.py'
--- a/bzrlib/transport/trace.py	2009-07-02 03:48:56 +0000
+++ b/bzrlib/transport/trace.py	2010-02-09 17:24:11 +0000
@@ -20,10 +20,10 @@
 and then delegates it.
 """
 
-from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
-
-
-class TransportTraceDecorator(TransportDecorator):
+from bzrlib.transport import decorator
+
+
+class TransportTraceDecorator(decorator.TransportDecorator):
     """A tracing decorator for Transports.
 
     Calls that potentially perform IO are logged to self._activity. The
@@ -169,13 +169,7 @@
         self._activity.append(operation_tuple)
 
 
-class TraceServer(DecoratorServer):
-    """Server for the TransportTraceDecorator for testing with."""
-
-    def get_decorator_class(self):
-        return TransportTraceDecorator
-
-
 def get_test_permutations():
     """Return the permutations to be used in testing."""
-    return [(TransportTraceDecorator, TraceServer)]
+    from bzrlib.tests import test_server
+    return [(TransportTraceDecorator, test_server.TraceServer)]



More information about the bazaar-commits mailing list