~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_properties.py

  • Committer: Ian Clatworthy
  • Date: 2008-05-13 05:42:55 UTC
  • mto: (3515.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 3516.
  • Revision ID: ian.clatworthy@canonical.com-20080513054255-76nwz6stnzt2ueao
add api to Tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    def test_get_properties_file_missing(self):
56
56
        pp = self.make_provider(None)
57
57
        self.assertEquals({}, pp.get_properties('a.txt'))
 
58
        self.assertEquals({'foo': None}, pp.get_properties('a.txt', ['foo']))
58
59
 
59
60
    def test_get_properties_file_empty(self):
60
61
        pp = self.make_provider([])
61
62
        self.assertEquals({}, pp.get_properties('a.txt'))
 
63
        self.assertEquals({'foo': None}, pp.get_properties('a.txt', ['foo']))
62
64
 
63
65
    def test_get_properties_from_extension_match(self):
64
66
        pp = self.make_provider(["[*.txt]", "foo=bar", "a=True"])
67
69
            pp.get_properties('a.txt'))
68
70
        self.assertEquals({'foo':'bar', 'a': 'True'},
69
71
            pp.get_properties('dir/a.txt'))
 
72
        self.assertEquals({'foo':'bar'},
 
73
            pp.get_properties('a.txt', ['foo']))
70
74
 
71
75
    def test_get_properties_pathname_match(self):
72
76
        pp = self.make_provider(["[./a.txt]", "foo=baz"])