~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: Martin Pool
  • Date: 2008-07-04 04:32:12 UTC
  • mfrom: (3350.9.1 stacking-annotate)
  • mto: This revision was merged to the branch mainline in revision 3527.
  • Revision ID: mbp@sourcefrog.net-20080704043212-jmwl1vrqhtao5gy3
Merge unoptimized annotate code for stacking, and only use it when needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
1431
1431
        # directly.
1432
1432
        basis.add_lines(key_basis, (), ['foo\n', 'bar\n'])
1433
1433
        basis.calls = []
1434
 
        self.assertRaises(RevisionNotPresent, test.annotate, key_basis)
1435
 
        raise KnownFailure("Annotation on stacked knits currently fails.")
1436
1434
        details = test.annotate(key_basis)
1437
1435
        self.assertEqual([(key_basis, 'foo\n'), (key_basis, 'bar\n')], details)
1438
 
        self.assertEqual([("annotate", key_basis)], basis.calls)
 
1436
        # Not optimised to date:
 
1437
        # self.assertEqual([("annotate", key_basis)], basis.calls)
 
1438
        self.assertEqual([('get_parent_map', set([key_basis])),
 
1439
            ('get_parent_map', set([key_basis])),
 
1440
            ('get_parent_map', set([key_basis])),
 
1441
            ('get_record_stream', [key_basis], 'unordered', True)],
 
1442
            basis.calls)
1439
1443
 
1440
1444
    def test_check(self):
1441
1445
        # check() must not check the fallback files, it's none of its business.