~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_rio.py

  • Committer: Andrew Bennetts
  • Date: 2010-09-13 06:36:59 UTC
  • mfrom: (5050.17.16 2.2)
  • mto: This revision was merged to the branch mainline in revision 5419.
  • Revision ID: andrew.bennetts@canonical.com-20100913063659-gs1d1xnsdbj59sx6
Merge lp:bzr/2.2, including fixes for #619872, #631350, #633745.

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
        self.assertEqual(s, None)
189
189
        self.assertTrue(s is None)
190
190
 
 
191
    def test_read_nul_byte(self):
 
192
        """File consisting of a nul byte causes an error."""
 
193
        self.assertRaises(ValueError, read_stanza, ['\0'])
 
194
 
 
195
    def test_read_nul_bytes(self):
 
196
        """File consisting of many nul bytes causes an error."""
 
197
        self.assertRaises(ValueError, read_stanza, ['\0' * 100])
 
198
 
191
199
    def test_read_iter(self):
192
200
        """Read several stanzas from file"""
193
201
        tmpf = TemporaryFile()