~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_symlinks.py

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2010 Canonical Ltd
 
1
# Copyright (C) 2010, 2011, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
67
67
            ('tree/dir/',),
68
68
            ('tree/dir/file', 'content'),
69
69
            ])
70
 
        self.assertEquals(
 
70
        self.assertEqual(
71
71
            tree.smart_add(['tree/link/file']),
72
72
            ([u'dir', u'dir/file'], {}))
73
73
        # should add the actual parent directory, not the apparent parent
103
103
        tree.commit('change to dir')
104
104
        tree.lock_read()
105
105
        self.addCleanup(tree.unlock)
106
 
        self.assertEquals([], list(tree.iter_changes(tree.basis_tree())))
 
106
        self.assertEqual([], list(tree.iter_changes(tree.basis_tree())))
107
107
        if tree._format.supports_versioned_directories:
108
 
            self.assertEquals(
 
108
            self.assertEqual(
109
109
                ['a', 'a/f'], sorted(info[0] for info in tree.list_files()))
110
110
        else:
111
 
            self.assertEquals([], list(tree.list_files()))
 
111
            self.assertEqual([], list(tree.list_files()))
112
112
 
113
113
    def test_dir_changes_to_symlink(self):
114
114
        # <https://bugs.launchpad.net/bzr/+bug/192859>:
148
148
    def check_open_containing(self, to_open, expected_tree_name,
149
149
        expected_relpath):
150
150
        wt, relpath = workingtree.WorkingTree.open_containing(to_open)
151
 
        self.assertEquals(relpath, expected_relpath)
 
151
        self.assertEqual(relpath, expected_relpath)
152
152
        self.assertEndsWith(wt.basedir, expected_tree_name)
153
153
 
154
154
    def test_tree_files(self):
166
166
    def check_tree_files(self, to_open, expected_tree, expect_paths):
167
167
        tree, relpaths = workingtree.WorkingTree.open_containing_paths(to_open)
168
168
        self.assertEndsWith(tree.basedir, expected_tree)
169
 
        self.assertEquals(expect_paths, relpaths)
 
169
        self.assertEqual(expect_paths, relpaths)
170
170
 
171
171
    def make_test_tree(self):
172
172
        tree = self.make_branch_and_tree('tree')