~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-03-09 22:33:11 UTC
  • mfrom: (1603.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060309223311-9b952a772944e322
Merge knit utf8 and reannotate-less support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
        k = KnitVersionedFile('test', LocalTransport('.'), factory=KnitPlainFactory(),
120
120
            delta=True, create=True)
121
121
        self.add_stock_one_and_one_a(k)
 
122
        k.clear_cache()
122
123
        self.assertEqualDiff(''.join(k.get_lines('text-1a')), TEXT_1A)
123
124
 
124
125
    def test_annotate(self):
299
300
        # and now read the other component
300
301
        k1.get_lines('sub')
301
302
        # should have read the second component
302
 
        self.assertEqual([('id.knit', [(87, 92)])], instrumented_t._calls)
 
303
        self.assertEqual([('id.knit', [(87, 93)])], instrumented_t._calls)
303
304
        instrumented_t._calls = []
304
305
 
305
306
        # clear the cache
321
322
        instrumented_t._calls = []
322
323
        # request a last-first iteration
323
324
        results = list(k1.iter_lines_added_or_present_in_versions(['base2', 'base']))
324
 
        self.assertEqual([('id.knit', [(0, 87), (87, 89)])], instrumented_t._calls)
 
325
        self.assertEqual([('id.knit', [(0, 87), (87, 90)])], instrumented_t._calls)
325
326
        self.assertEqual(['text\n', 'text2\n'], results)
326
327
 
327
328
    def test_create_empty_annotated(self):