~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_groupcompress.py

  • Committer: Robert J. Tanner
  • Date: 2009-04-30 22:40:42 UTC
  • mfrom: (4323 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4324.
  • Revision ID: tanner@real-time.com-20090430224042-53v45axtue5bw45l
Merge 1.14.1 back to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
447
447
        # And the decompressor is finalized
448
448
        self.assertIs(None, block._z_content_decompressor)
449
449
 
 
450
    def test__dump(self):
 
451
        dup_content = 'some duplicate content\nwhich is sufficiently long\n'
 
452
        key_to_text = {('1',): dup_content + '1 unique\n',
 
453
                       ('2',): dup_content + '2 extra special\n'}
 
454
        locs, block = self.make_block(key_to_text)
 
455
        self.assertEqual([('f', len(key_to_text[('1',)])),
 
456
                          ('d', 21, len(key_to_text[('2',)]),
 
457
                           [('c', 2, len(dup_content)),
 
458
                            ('i', len('2 extra special\n'), '')
 
459
                           ]),
 
460
                         ], block._dump())
 
461
 
450
462
 
451
463
class TestCaseWithGroupCompressVersionedFiles(tests.TestCaseWithTransport):
452
464