~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_create_checkout.py

  • Committer: Martin Packman
  • Date: 2012-01-05 09:50:04 UTC
  • mfrom: (6424 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6426.
  • Revision ID: martin.packman@canonical.com-20120105095004-mia9xb7y0efmto0v
Merge bzr.dev to resolve conflicts in bzrlib.builtins

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
class TestCreateCheckout(per_branch.TestCaseWithBranch):
23
23
 
24
 
    def test_checkout_format(self):
25
 
        """Make sure the new checkout uses the desired branch format."""
26
 
        a_branch = self.make_branch('branch')
27
 
        tree = a_branch.create_checkout('checkout')
28
 
        # All branches can define the format they want checkouts made in.
29
 
        # This checks it is honoured.
30
 
        expected_format = a_branch._get_checkout_format().get_branch_format()
31
 
        self.assertEqual(expected_format.__class__,
32
 
                         tree.branch._format.__class__)
 
24
    def test_checkout_format_lightweight(self):
 
25
        """Make sure the new light checkout uses the desired branch format."""
 
26
        a_branch = self.make_branch('branch')
 
27
        tree = a_branch.create_checkout('checkout', lightweight=True)
 
28
        # All branches can define the format they want checkouts made in.
 
29
        # This checks it is honoured.
 
30
        expected_format = a_branch._get_checkout_format(lightweight=True)
 
31
        self.assertEqual(expected_format.get_branch_format().network_name(),
 
32
                         tree.branch._format.network_name())
 
33
 
 
34
    def test_checkout_format_heavyweight(self):
 
35
        """Make sure the new heavy checkout uses the desired branch format."""
 
36
        a_branch = self.make_branch('branch')
 
37
        tree = a_branch.create_checkout('checkout', lightweight=False)
 
38
        # All branches can define the format they want checkouts made in.
 
39
        # This checks it is honoured.
 
40
        expected_format = a_branch._get_checkout_format(lightweight=False)
 
41
        self.assertEqual(expected_format.get_branch_format().network_name(),
 
42
                         tree.branch._format.network_name())
33
43
 
34
44
    def test_create_revision_checkout(self):
35
45
        """Test that we can create a checkout from an earlier revision."""