~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_versionedfile.py

  • Committer: Martin Pool
  • Date: 2007-08-15 04:33:34 UTC
  • mto: (2701.1.2 remove-should-cache)
  • mto: This revision was merged to the branch mainline in revision 2710.
  • Revision ID: mbp@sourcefrog.net-20070815043334-01dx9emb0vjiy29v
Remove things deprecated in 0.11 and earlier

Show diffs side-by-side

added added

removed removed

Lines of Context:
524
524
        self.assertRaises(RevisionNotPresent,
525
525
            f.annotate, 'foo')
526
526
 
527
 
    def test_walk(self):
528
 
        # tests that walk returns all the inclusions for the requested
529
 
        # revisions as well as the revisions changes themselves.
530
 
        f = self.get_file('1')
531
 
        f.add_lines('r0', [], ['a\n', 'b\n'])
532
 
        f.add_lines('r1', ['r0'], ['c\n', 'b\n'])
533
 
        f.add_lines('rX', ['r1'], ['d\n', 'b\n'])
534
 
        f.add_lines('rY', ['r1'], ['c\n', 'e\n'])
535
 
 
536
 
        lines = {}
537
 
        for lineno, insert, dset, text in f.walk(['rX', 'rY']):
538
 
            lines[text] = (insert, dset)
539
 
 
540
 
        self.assertTrue(lines['a\n'], ('r0', set(['r1'])))
541
 
        self.assertTrue(lines['b\n'], ('r0', set(['rY'])))
542
 
        self.assertTrue(lines['c\n'], ('r1', set(['rX'])))
543
 
        self.assertTrue(lines['d\n'], ('rX', set([])))
544
 
        self.assertTrue(lines['e\n'], ('rY', set([])))
545
 
 
546
527
    def test_detection(self):
547
528
        # Test weaves detect corruption.
548
529
        #