~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: 2006-09-19 03:52:02 UTC
  • mfrom: (2018.1.11 bzr+ssh:// testing)
  • Revision ID: pqm@pqm.ubuntu.com-20060919035202-8174b4dc7ff91add
(Andrew Bennetts, Robert Collins) Add bzr+ssh:// url support and turn the smart server into a anonymous readonly server by default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
932
932
            for env_var, value in old_env.iteritems():
933
933
                osutils.set_or_unset_env(env_var, value)
934
934
 
935
 
        bzr_path = os.path.dirname(os.path.dirname(bzrlib.__file__))+'/bzr'
936
 
        if not os.path.isfile(bzr_path):
937
 
            # We are probably installed. Assume sys.argv is the right file
938
 
            bzr_path = sys.argv[0]
 
935
        bzr_path = self.get_bzr_path()
939
936
 
940
937
        try:
941
938
            # win32 subprocess doesn't support preexec_fn
948
945
            restore_environment()
949
946
        return process
950
947
 
 
948
    def get_bzr_path(self):
 
949
        """Return the path of the 'bzr' executable for this test suite."""
 
950
        bzr_path = os.path.dirname(os.path.dirname(bzrlib.__file__))+'/bzr'
 
951
        if not os.path.isfile(bzr_path):
 
952
            # We are probably installed. Assume sys.argv is the right file
 
953
            bzr_path = sys.argv[0]
 
954
        return bzr_path
 
955
 
951
956
    def finish_bzr_subprocess(self, process, retcode=0, send_signal=None,
952
957
                              universal_newlines=False, process_args=None):
953
958
        """Finish the execution of process.