~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

Various changes to allow non-workingtree specific tests to run entirely
from MemoryTransports:
 * Create MemoryTree and pull up common code for it from WorkingTree to
   a new common base class MutableTree.
 * Add MutableTree.mkdir().
 * Add MutableTree.put_file_bytes_nonatomic().
 * New test helper make_branch_and_memory_tree().
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
893
893
        self.assertIsInstance(bzrlib.bzrdir.BzrDir.open('b')._format,
894
894
                              bzrlib.bzrdir.BzrDirFormat6)
895
895
 
 
896
    def test_make_branch_and_mutable_tree(self):
 
897
        # we should be able to get a new branch and a mutable tree from
 
898
        # TestCaseWithTransport
 
899
        tree = self.make_branch_and_memory_tree('a')
 
900
        self.assertIsInstance(tree, bzrlib.memorytree.MemoryTree)
 
901
 
896
902
 
897
903
class TestSelftest(TestCase):
898
904
    """Tests of bzrlib.tests.selftest."""