~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_pack.py

  • Committer: Aaron Bentley
  • Date: 2009-06-19 21:16:31 UTC
  • mto: This revision was merged to the branch mainline in revision 4481.
  • Revision ID: aaron@aaronbentley.com-20090619211631-4fnkv2uui98xj7ux
Provide control over switch and shelver messaging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
610
610
            [([('name1',)], 'body1'), ([('name2',)], 'body2')],
611
611
            parser.read_pending_records())
612
612
 
613
 
    def test_multiple_empty_records_at_once(self):
614
 
        """If multiple empty records worth of data are fed to the parser in one
615
 
        string, the parser will correctly parse all the records.
616
 
 
617
 
        (A naive implementation might stop after parsing the first empty
618
 
        record, because the buffer size had not changed.)
619
 
        """
620
 
        parser = self.make_parser_expecting_record_type()
621
 
        parser.accept_bytes("B0\nname1\n\nB0\nname2\n\n")
622
 
        self.assertEqual(
623
 
            [([('name1',)], ''), ([('name2',)], '')],
624
 
            parser.read_pending_records())
625
 
 
626
613
 
627
614
class TestContainerPushParserBytesParsing(PushParserTestCase):
628
615
    """Tests for reading Bytes records with ContainerPushParser.