/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Daniel Watkins
  • Date: 2007-11-13 02:10:22 UTC
  • mfrom: (2981 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2983.
  • Revision ID: d.m.watkins@warwick.ac.uk-20071113021022-1u3x2k4q4kh1pxh5
Merged bzr.dev and moved NEWS item to appropriate location.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
class TestCreateCheckout(TestCaseWithBranch):
27
27
 
28
28
    def test_checkout_format(self):
29
 
        """Make sure the new checkout uses the same branch format."""
 
29
        """Make sure the new checkout uses the desired branch format."""
30
30
        a_branch = self.make_branch('branch')
31
 
        if isinstance(a_branch, RemoteBranch):
32
 
            # RemoteBranch formats are not the same as local ones, and dont
33
 
            # duplicate the format string (because there is no format string as
34
 
            # such - it might be e.g. totally virtual on the server end).
35
 
            # This test can only assess the checkout format correctness *in
36
 
            # general* when there is a real object locally present for both the
37
 
            # source and target.
38
 
            return
39
31
        tree = a_branch.create_checkout('checkout')
40
 
        if self.branch_format in branch._legacy_formats:
41
 
            # Legacy formats create checkouts with the default format.
42
 
            # Only newer formats create identical checkouts.
43
 
            expected_format = branch.BranchFormat.get_default_format()
44
 
        else:
45
 
            expected_format = a_branch._format
 
32
        # All branches can define the format they want checkouts made in.
 
33
        # This checks it is honoured.
 
34
        expected_format = a_branch._get_checkout_format().get_branch_format()
46
35
        self.assertEqual(expected_format.__class__,
47
36
                         tree.branch._format.__class__)
48
37