~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_chunk_writer.py

  • Committer: John Arbash Meinel
  • Date: 2008-08-22 05:54:44 UTC
  • mto: This revision was merged to the branch mainline in revision 3653.
  • Revision ID: john@arbash-meinel.com-20080822055444-5kcr0csbbvkqbbiw
If we repack earlier, it catches this case.
Still need to fix the other tests, but at least
the too_much test passes now.
Impact on real-world results is measurable
(2-3% final compression). Is it worth it?

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
            lines.append(''.join(map(str, numbers)) + '\n')
60
60
        writer = chunk_writer.ChunkWriter(4096)
61
61
        for idx, line in enumerate(lines):
62
 
            if idx >= 45:
63
 
                import pdb; pdb.set_trace()
64
62
            if writer.write(line):
65
 
                self.assertEqual(47, idx)
 
63
                self.assertEqual(46, idx)
66
64
                break
67
65
        bytes_list, unused, _ = writer.finish()
68
66
        node_bytes = self.check_chunk(bytes_list, 4096)