~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: John Arbash Meinel
  • Date: 2006-10-16 01:50:48 UTC
  • mfrom: (2078 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: john@arbash-meinel.com-20061016015048-0f22df07e38093da
[merge] bzr.dev 2078

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
import unittest
25
25
import warnings
26
26
 
27
 
from bzrlib import osutils, memorytree
28
27
import bzrlib
 
28
from bzrlib import (
 
29
    bzrdir,
 
30
    memorytree,
 
31
    osutils,
 
32
    repository,
 
33
    )
29
34
from bzrlib.progress import _BaseProgressBar
30
35
from bzrlib.tests import (
31
36
                          ChrootedTestCase,
466
471
        self.failIfExists('dir')
467
472
        self.assertIsInstance(tree, memorytree.MemoryTree)
468
473
 
 
474
    def test_make_branch_and_memory_tree_with_format(self):
 
475
        """make_branch_and_memory_tree should accept a format option."""
 
476
        format = bzrdir.BzrDirMetaFormat1()
 
477
        format.repository_format = repository.RepositoryFormat7()
 
478
        tree = self.make_branch_and_memory_tree('dir', format=format)
 
479
        self.failIfExists('dir')
 
480
        self.assertIsInstance(tree, memorytree.MemoryTree)
 
481
        self.assertEqual(format.repository_format.__class__,
 
482
            tree.branch.repository._format.__class__)
 
483
 
469
484
 
470
485
class TestTestCaseWithTransport(TestCaseWithTransport):
471
486
    """Tests for the convenience functions TestCaseWithTransport introduces."""