~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2010 Canonical Ltd
 
1
# Copyright (C) 2007-2012 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()
156
158
        self.assertEqual(branchb_id, checkout.last_revision())
157
 
        self.assertEqual(tree2.branch.base, checkout.branch.get_bound_location())
 
159
        self.assertEqual(tree2.branch.base,
 
160
                         checkout.branch.get_bound_location())
158
161
 
159
162
    def test_switch_finds_relative_unicode_branch(self):
160
163
        """Switch will find 'foo' relative to the branch the checkout is of."""