~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-05 01:58:00 UTC
  • mto: This revision was merged to the branch mainline in revision 5830.
  • Revision ID: jelmer@samba.org-20110505015800-89t3un3ha2ktdohp
Fix more imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    transport,
24
24
    workingtree,
25
25
    workingtree_3,
 
26
    workingtree_4,
26
27
    )
27
28
from bzrlib.lockdir import LockDir
28
29
from bzrlib.mutabletree import needs_tree_write_lock
64
65
    def test_get_set_default_format(self):
65
66
        old_format = workingtree.format_registry.get_default()
66
67
        # default is 6
67
 
        self.assertTrue(isinstance(old_format, workingtree.WorkingTreeFormat6))
 
68
        self.assertTrue(isinstance(old_format, workingtree_4.WorkingTreeFormat6))
68
69
        workingtree.format_registry.set_default(SampleTreeFormat())
69
70
        try:
70
71
            # the default branch format is used by the meta dir format
80
81
 
81
82
    def test_get_set_default_format_by_key(self):
82
83
        old_format = workingtree.format_registry.get_default()
83
 
        # default is 3
 
84
        # default is 6
84
85
        format = SampleTreeFormat()
85
86
        workingtree.format_registry.register(format)
86
87
        self.addCleanup(workingtree.format_registry.remove, format)
87
 
        self.assertTrue(isinstance(old_format, workingtree_3.WorkingTreeFormat3))
 
88
        self.assertTrue(isinstance(old_format, workingtree_4.WorkingTreeFormat6))
88
89
        workingtree.format_registry.set_default_key(format.get_format_string())
89
90
        try:
90
91
            # the default branch format is used by the meta dir format