~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_tree/test_iter_search_rules.py

  • Committer: Vincent Ladeuil
  • Date: 2016-02-01 18:09:18 UTC
  • mfrom: (6614.1.3 assert)
  • mto: This revision was merged to the branch mainline in revision 6615.
  • Revision ID: v.ladeuil+lp@free.fr-20160201180918-jqtq8ol6gdbbbtpv
Fix deprecated assertions to unblock release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2008, 2009, 2010, 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
18
18
 
19
19
from bzrlib import (
20
20
    rules,
21
 
    )
 
21
)
22
22
from bzrlib.tests.per_tree import TestCaseWithTree
23
23
 
24
24
 
47
47
            "[name *.txt]\nfoo=bar\na=True\n")
48
48
        tree = self.make_tree_with_rules(None)
49
49
        result = list(tree.iter_search_rules(['a.txt', 'dir/a.txt'],
50
 
            _default_searcher=per_user))
51
 
        self.assertEquals((('foo', 'baz'),), result[0])
52
 
        self.assertEquals((('foo', 'bar'), ('a', 'True')), result[1])
 
50
                                             _default_searcher=per_user))
 
51
        self.assertEqual((('foo', 'baz'),), result[0])
 
52
        self.assertEqual((('foo', 'bar'), ('a', 'True')), result[1])
53
53
 
54
54
    def _disabled_test_iter_search_rules_just_tree(self):
55
55
        per_user = self.make_per_user_searcher('')
60
60
            "foo=bar\n"
61
61
            "a=True\n")
62
62
        result = list(tree.iter_search_rules(['a.txt', 'dir/a.txt'],
63
 
            _default_searcher=per_user))
64
 
        self.assertEquals((('foo', 'baz'),), result[0])
65
 
        self.assertEquals((('foo', 'bar'), ('a', 'True')), result[1])
 
63
                                             _default_searcher=per_user))
 
64
        self.assertEqual((('foo', 'baz'),), result[0])
 
65
        self.assertEqual((('foo', 'bar'), ('a', 'True')), result[1])
66
66
 
67
67
    def _disabled_test_iter_search_rules_tree_and_per_user(self):
68
68
        per_user = self.make_per_user_searcher(
72
72
            "[name ./a.txt]\n"
73
73
            "foo=qwerty\n")
74
74
        result = list(tree.iter_search_rules(['a.txt', 'dir/a.txt'],
75
 
            _default_searcher=per_user))
76
 
        self.assertEquals((('foo', 'qwerty'),), result[0])
77
 
        self.assertEquals((('foo', 'bar'), ('a', 'True')), result[1])
 
75
                                             _default_searcher=per_user))
 
76
        self.assertEqual((('foo', 'qwerty'),), result[0])
 
77
        self.assertEqual((('foo', 'bar'), ('a', 'True')), result[1])