~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

  • Committer: Robert Collins
  • Date: 2006-04-19 23:32:08 UTC
  • mto: (1711.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1674.
  • Revision ID: robertc@robertcollins.net-20060419233208-2ed6906796994316
Make knit the default format.
Adjust affect tests to either have knit specific values or to be more generic,
as appropriate.
Disable all SFTP prefetching for known paramikos - direct readv support is now
a TODO.

Show diffs side-by-side

added added

removed removed

Lines of Context:
89
89
        k = KnitVersionedFile('test', LocalTransport('.'), delta=False, create=True)
90
90
        k.add_lines('text-1', [], ['a\n',    'b'  ])
91
91
        k.add_lines('text-2', ['text-1'], ['a\rb\n', 'b\n'])
 
92
        # reopening ensures maximum room for confusion
 
93
        k = KnitVersionedFile('test', LocalTransport('.'), delta=False, create=True)
92
94
        self.assertEquals(k.get_lines('text-1'), ['a\n',    'b'  ])
93
95
        self.assertEquals(k.get_lines('text-2'), ['a\rb\n', 'b\n'])
94
96
 
338
340
        # this tests that a new knit index file has the expected content
339
341
        # and that is writes the data we expect as records are added.
340
342
        knit = self.make_test_knit(True)
341
 
        self.assertFileEqual("# bzr knit index 7\n", 'test.kndx')
 
343
        self.assertFileEqual("# bzr knit index 8\n", 'test.kndx')
342
344
        knit.add_lines_with_ghosts('revid', ['a_ghost'], ['a\n'])
343
345
        self.assertFileEqual(
344
 
            "# bzr knit index 7\n"
 
346
            "# bzr knit index 8\n"
345
347
            "\n"
346
348
            "revid fulltext 0 84 .a_ghost :",
347
349
            'test.kndx')
348
350
        knit.add_lines_with_ghosts('revid2', ['revid'], ['a\n'])
349
351
        self.assertFileEqual(
350
 
            "# bzr knit index 7\n"
 
352
            "# bzr knit index 8\n"
351
353
            "\nrevid fulltext 0 84 .a_ghost :"
352
354
            "\nrevid2 line-delta 84 82 0 :",
353
355
            'test.kndx')