~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-19 08:43:45 UTC
  • mfrom: (4017.2.3 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090219084345-0wx5gbw9v6hdmjmz
(robertc) Create remote BzrDir objects using the existing bzr:// RPC
        method when. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
from bzrlib.merge import merge_inner
77
77
import bzrlib.merge3
78
78
import bzrlib.plugin
 
79
from bzrlib.smart import client, server
79
80
import bzrlib.store
80
81
from bzrlib import symbol_versioning
81
82
from bzrlib.symbol_versioning import (
2041
2042
        self.__server = None
2042
2043
        self.reduceLockdirTimeout()
2043
2044
 
 
2045
    def setup_smart_server_with_call_log(self):
 
2046
        """Sets up a smart server as the transport server with a call log."""
 
2047
        self.transport_server = server.SmartTCPServer_for_testing
 
2048
        self.hpss_calls = []
 
2049
        def capture_hpss_call(params):
 
2050
            import traceback
 
2051
            self.hpss_calls.append((params, traceback.format_stack()))
 
2052
        client._SmartClient.hooks.install_named_hook(
 
2053
            'call', capture_hpss_call, None)
 
2054
 
 
2055
    def reset_smart_call_log(self):
 
2056
        self.hpss_calls = []
 
2057
 
2044
2058
     
2045
2059
class TestCaseInTempDir(TestCaseWithMemoryTransport):
2046
2060
    """Derived class that runs a test within a temporary directory.