~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_switch.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-01 19:55:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6460.
  • Revision ID: jelmer@samba.org-20120201195527-p11zolw13w81035y
Consider invalid mail clients an error rather than just a warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2012 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
153
153
        branchb_id = tree2.commit('bar')
154
154
        checkout = tree1.branch.create_checkout('heavyco/a', lightweight=False)
155
155
        self.run_bzr(['switch', 'branchb'], working_dir='heavyco/a')
156
 
        # Refresh checkout as 'switch' modified it
157
 
        checkout = checkout.bzrdir.open_workingtree()
158
156
        self.assertEqual(branchb_id, checkout.last_revision())
159
 
        self.assertEqual(tree2.branch.base,
160
 
                         checkout.branch.get_bound_location())
 
157
        self.assertEqual(tree2.branch.base, checkout.branch.get_bound_location())
161
158
 
162
159
    def test_switch_finds_relative_unicode_branch(self):
163
160
        """Switch will find 'foo' relative to the branch the checkout is of."""
191
188
        revid2 = tree.commit('rev2')
192
189
        self.run_bzr(['switch', '-b', 'anotherbranch'])
193
190
        self.assertEquals(
194
 
            set(['', 'anotherbranch']),
195
 
            set(tree.branch.bzrdir.get_branches().keys()))
 
191
            ['', 'anotherbranch'],
 
192
            tree.branch.bzrdir.get_branches().keys())
196
193
 
197
194
    def test_switch_into_unrelated_colocated(self):
198
195
        # Create a new colocated branch from an existing non-colocated branch.