~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_groupcompress.py

  • Committer: John Arbash Meinel
  • Date: 2009-04-19 01:16:26 UTC
  • mto: (4241.16.2 1.14)
  • mto: This revision was merged to the branch mainline in revision 4300.
  • Revision ID: john@arbash-meinel.com-20090419011626-2eq002nz7tkjij16
PythonGroupCompressor needs to support pop_last() properly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
                          'different\n', sha1_2),
120
120
                         compressor.extract(('newlabel',)))
121
121
 
 
122
    def test_pop_last(self):
 
123
        compressor = self.compressor()
 
124
        _, _, _, _ = compressor.compress(('key1',),
 
125
            'some text\nfor the first entry\n', None)
 
126
        expected_lines = list(compressor.chunks)
 
127
        _, _, _, _ = compressor.compress(('key2',),
 
128
            'some text\nfor the second entry\n', None)
 
129
        compressor.pop_last()
 
130
        self.assertEqual(expected_lines, compressor.chunks)
 
131
 
122
132
 
123
133
class TestPyrexGroupCompressor(TestGroupCompressor):
124
134