~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2012-04-02 01:44:26 UTC
  • mfrom: (6518 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6519.
  • Revision ID: jelmer@samba.org-20120402014426-0o5qtysohyl006b2
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
import bzrlib
61
61
from bzrlib import (
62
62
    branchbuilder,
63
 
    bzrdir,
 
63
    controldir,
64
64
    chk_map,
65
65
    commands as _mod_commands,
66
66
    config,
1026
1026
        # between tests.  We should get rid of this altogether: bug 656694. --
1027
1027
        # mbp 20101008
1028
1028
        self.overrideAttr(bzrlib.trace, '_verbosity_level', 0)
1029
 
        # Isolate config option expansion until its default value for bzrlib is
1030
 
        # settled on or a the FIXME associated with _get_expand_default_value
1031
 
        # is addressed -- vila 20110219
1032
 
        self.overrideAttr(config, '_expand_default_value', None)
1033
1029
        self._log_files = set()
1034
1030
        # Each key in the ``_counters`` dict holds a value for a different
1035
1031
        # counter. When the test ends, addDetail() should be used to output the
1328
1324
        # hook into bzr dir opening. This leaves a small window of error for
1329
1325
        # transport tests, but they are well known, and we can improve on this
1330
1326
        # step.
1331
 
        bzrdir.BzrDir.hooks.install_named_hook("pre_open",
 
1327
        controldir.ControlDir.hooks.install_named_hook("pre_open",
1332
1328
            self._preopen_isolate_transport, "Check bzr directories are safe.")
1333
1329
 
1334
1330
    def _ndiff_strings(self, a, b):
2603
2599
        # http://pad.lv/825027).
2604
2600
        self.assertIs(None, os.environ.get('BZR_HOME', None))
2605
2601
        os.environ['BZR_HOME'] = root
2606
 
        wt = bzrdir.BzrDir.create_standalone_workingtree(root)
 
2602
        wt = controldir.ControlDir.create_standalone_workingtree(root)
2607
2603
        del os.environ['BZR_HOME']
2608
2604
        # Hack for speed: remember the raw bytes of the dirstate file so that
2609
2605
        # we don't need to re-open the wt to check it hasn't changed.
2680
2676
        if format is None:
2681
2677
            format = self.get_default_format()
2682
2678
        if isinstance(format, basestring):
2683
 
            format = bzrdir.format_registry.make_bzrdir(format)
 
2679
            format = controldir.format_registry.make_bzrdir(format)
2684
2680
        return format
2685
2681
 
2686
2682
    def make_bzrdir(self, relpath, format=None):
2854
2850
        # stacking policy to honour; create a bzr dir with an unshared
2855
2851
        # repository (but not a branch - our code would be trying to escape
2856
2852
        # then!) to stop them, and permit it to be read.
2857
 
        # control = bzrdir.BzrDir.create(self.test_base_dir)
 
2853
        # control = controldir.ControlDir.create(self.test_base_dir)
2858
2854
        # control.create_repository()
2859
2855
        self.test_home_dir = self.test_base_dir + '/home'
2860
2856
        os.mkdir(self.test_home_dir)
3000
2996
            if self.vfs_transport_factory is test_server.LocalURLServer:
3001
2997
                # the branch is colocated on disk, we cannot create a checkout.
3002
2998
                # hopefully callers will expect this.
3003
 
                local_controldir= bzrdir.BzrDir.open(self.get_vfs_only_url(relpath))
 
2999
                local_controldir = controldir.ControlDir.open(
 
3000
                    self.get_vfs_only_url(relpath))
3004
3001
                wt = local_controldir.create_workingtree()
3005
3002
                if wt.branch._format != b._format:
3006
3003
                    wt._branch = b
3909
3906
        'bzrlib.doc',
3910
3907
        'bzrlib.tests.blackbox',
3911
3908
        'bzrlib.tests.commands',
3912
 
        'bzrlib.tests.doc_generate',
3913
3909
        'bzrlib.tests.per_branch',
3914
3910
        'bzrlib.tests.per_bzrdir',
3915
3911
        'bzrlib.tests.per_controldir',