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']))
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']))
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'))
71
71
def test_get_items_match_first(self):
72
72
rs = self.make_searcher(