/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_groupcompress.py

  • Committer: John Arbash Meinel
  • Date: 2009-04-22 17:18:45 UTC
  • mto: This revision was merged to the branch mainline in revision 4301.
  • Revision ID: john@arbash-meinel.com-20090422171845-5dmqokv8ygf3cvs5
Add the ability to convert a gc block into 'human readable' form.

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