~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_matchers.py

  • Committer: Patch Queue Manager
  • Date: 2011-12-19 17:14:34 UTC
  • mfrom: (6378.1.5 config-si-unit)
  • Revision ID: pqm@pqm.ubuntu.com-20111219171434-i0b4ir0invs9il2v
(vila) Migrate add.maximum_file_size configuration option. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
        self.assertEquals([calls[0].call], mismatch.vfs_calls)
179
179
        self.assertEquals("no VFS calls expected, got: append('file')""",
180
180
                mismatch.describe())
181
 
 
182
 
 
183
 
class TestRevisionHistoryMatches(TestCaseWithTransport):
184
 
 
185
 
    def test_empty(self):
186
 
        tree = self.make_branch_and_tree('.')
187
 
        matcher = RevisionHistoryMatches([])
188
 
        self.assertIs(None, matcher.match(tree.branch))
189
 
 
190
 
    def test_matches(self):
191
 
        tree = self.make_branch_and_tree('.')
192
 
        tree.commit('msg1', rev_id='a')
193
 
        tree.commit('msg2', rev_id='b')
194
 
        matcher = RevisionHistoryMatches(['a', 'b'])
195
 
        self.assertIs(None, matcher.match(tree.branch))
196
 
 
197
 
    def test_mismatch(self):
198
 
        tree = self.make_branch_and_tree('.')
199
 
        tree.commit('msg1', rev_id='a')
200
 
        tree.commit('msg2', rev_id='b')
201
 
        matcher = RevisionHistoryMatches(['a', 'b', 'c'])
202
 
        self.assertEquals(
203
 
            "['a', 'b', 'c'] != ['a', 'b']",
204
 
            matcher.match(tree.branch).describe())