~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ignores.py

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:56:05 UTC
  • mfrom: (6615.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201195605-o7rl92wf6uyum3fk
(vila) Open trunk again as 2.8b1 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 Canonical Ltd
 
1
# Copyright (C) 2006-2012, 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
149
149
class TestRuntimeIgnores(TestCase):
150
150
 
151
151
    def setUp(self):
152
 
        TestCase.setUp(self)
 
152
        super(TestRuntimeIgnores, self).setUp()
153
153
 
154
154
        # For the purposes of these tests, we must have no
155
155
        # runtime ignores
175
175
    
176
176
    def assertPatternsEquals(self, patterns):
177
177
        contents = open(".bzrignore", 'rU').read().strip().split('\n')
178
 
        self.assertEquals(sorted(patterns), sorted(contents))
 
178
        self.assertEqual(sorted(patterns), sorted(contents))
179
179
 
180
180
    def test_new_file(self):
181
181
        tree = self.make_branch_and_tree(".")
222
222
        self.build_tree_contents([('.bzrignore', "myentry1\r\n")])
223
223
        tree.add([".bzrignore"])
224
224
        ignores.tree_ignores_add_patterns(tree, ["myentry2", "foo"])
225
 
        self.assertEquals(open('.bzrignore', 'rb').read(), 'myentry1\r\nmyentry2\r\nfoo\r\n')
 
225
        self.assertEqual(open('.bzrignore', 'rb').read(), 'myentry1\r\nmyentry2\r\nfoo\r\n')
226
226
        self.assertPatternsEquals(["myentry1", "myentry2", "foo"])