~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_ignores.py

  • Committer: Jelmer Vernooij
  • Date: 2016-04-03 16:32:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6617.
  • Revision ID: jelmer@jelmer.uk-20160403163231-h72bo0uyek2gikw0
Don't put French text in doc/en/user-reference when LANGUAGE=fr_CH.UTF_8.

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"])