~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_rules.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-07-18 10:00:17 UTC
  • mfrom: (3564.2.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080718100017-segv2csk7ux2xs9p
Fix RuleSearcher to return () not [] (Ian Clatworthy)

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
    def test_get_items_file_missing(self):
46
46
        rs = self.make_searcher(None)
47
 
        self.assertEquals([], rs.get_items('a.txt'))
48
 
        self.assertEquals([], rs.get_selected_items('a.txt', ['foo']))
 
47
        self.assertEquals((), rs.get_items('a.txt'))
 
48
        self.assertEquals((), rs.get_selected_items('a.txt', ['foo']))
49
49
 
50
50
    def test_get_items_file_empty(self):
51
51
        rs = self.make_searcher("")
52
 
        self.assertEquals([], rs.get_items('a.txt'))
53
 
        self.assertEquals([], rs.get_selected_items('a.txt', ['foo']))
 
52
        self.assertEquals((), rs.get_items('a.txt'))
 
53
        self.assertEquals((), rs.get_selected_items('a.txt', ['foo']))
54
54
 
55
55
    def test_get_items_from_extension_match(self):
56
56
        rs = self.make_searcher("[name *.txt]\nfoo=bar\na=True\n")
57
 
        self.assertEquals([], rs.get_items('a.py'))
 
57
        self.assertEquals((), rs.get_items('a.py'))
58
58
        self.assertEquals((('foo', 'bar'), ('a', 'True')),
59
59
            rs.get_items('a.txt'))
60
60
        self.assertEquals((('foo', 'bar'), ('a', 'True')),
66
66
        rs = self.make_searcher("[name ./a.txt]\nfoo=baz\n")
67
67
        self.assertEquals((('foo', 'baz'),),
68
68
            rs.get_items('a.txt'))
69
 
        self.assertEquals([], rs.get_items('dir/a.txt'))
 
69
        self.assertEquals((), rs.get_items('dir/a.txt'))
70
70
 
71
71
    def test_get_items_match_first(self):
72
72
        rs = self.make_searcher(