~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2015-10-05 13:45:00 UTC
  • mfrom: (6603.3.1 bts794146)
  • Revision ID: pqm@pqm.ubuntu.com-20151005134500-v244rho557tv0ukd
(vila) Resolve Bug #1480015: Test failure: hexify removed from paramiko
 (Andrew Starr-Bochicchio) (Andrew Starr-Bochicchio)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2012, 2016 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
205
205
        tree.add('file-2')
206
206
        revid2 = tree.commit('rev2')
207
207
        self.run_bzr(['switch', '-b', 'anotherbranch'])
208
 
        self.assertEqual(
 
208
        self.assertEquals(
209
209
            set(['', 'anotherbranch']),
210
210
            set(tree.branch.bzrdir.get_branches().keys()))
211
211
 
238
238
        otherbranch.generate_revision_history(revid1)
239
239
        self.run_bzr(['switch', 'anotherbranch'], working_dir='branch-1')
240
240
        tree = WorkingTree.open("branch-1")
241
 
        self.assertEqual(tree.last_revision(), revid1)
242
 
        self.assertEqual(tree.branch.control_url, otherbranch.control_url)
 
241
        self.assertEquals(tree.last_revision(), revid1)
 
242
        self.assertEquals(tree.branch.control_url, otherbranch.control_url)
243
243
 
244
244
    def test_switch_new_colocated(self):
245
245
        # Create a branch branch-1 that initially is a checkout of 'foo'
253
253
        revid1 = tree.commit('rev1')
254
254
        self.run_bzr(['switch', '-b', 'anotherbranch'], working_dir='branch-1')
255
255
        bzrdir = ControlDir.open("branch-1")
256
 
        self.assertEqual(
 
256
        self.assertEquals(
257
257
            set([b.name for b in bzrdir.list_branches()]),
258
258
            set(["foo", "anotherbranch"]))
259
 
        self.assertEqual(bzrdir.open_branch().name, "anotherbranch")
260
 
        self.assertEqual(bzrdir.open_branch().last_revision(), revid1)
 
259
        self.assertEquals(bzrdir.open_branch().name, "anotherbranch")
 
260
        self.assertEquals(bzrdir.open_branch().last_revision(), revid1)
261
261
 
262
262
    def test_switch_new_colocated_unicode(self):
263
263
        # Create a branch branch-1 that initially is a checkout of 'foo'
272
272
        revid1 = tree.commit('rev1')
273
273
        self.run_bzr(['switch', '-b', u'branch\xe9'], working_dir='branch-1')
274
274
        bzrdir = ControlDir.open("branch-1")
275
 
        self.assertEqual(
 
275
        self.assertEquals(
276
276
            set([b.name for b in bzrdir.list_branches()]),
277
277
            set(["foo", u"branch\xe9"]))
278
 
        self.assertEqual(bzrdir.open_branch().name, u"branch\xe9")
279
 
        self.assertEqual(bzrdir.open_branch().last_revision(), revid1)
 
278
        self.assertEquals(bzrdir.open_branch().name, u"branch\xe9")
 
279
        self.assertEquals(bzrdir.open_branch().last_revision(), revid1)
280
280
 
281
281
    def test_switch_only_revision(self):
282
282
        tree = self._create_sample_tree()